commit: 82cd1252b58cce7fd32aafb89a21865715c23eb3
parent: 09b0f6dd87dcc8e0a03170bb84a9064009772824
Author: Shpuld Shpludson <shp@cock.li>
Date: Thu, 7 Mar 2019 16:34:43 +0000
Merge branch '415-timeline' into 'develop'
Fix timeline updating bug when scrolled down
Closes #415
See merge request pleroma/pleroma-fe!644
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js
@@ -132,7 +132,9 @@ const Timeline = {
}
if (count > 0) {
// only 'stream' them when you're scrolled to the top
- if (window.pageYOffset < 15 &&
+ const doc = document.documentElement
+ const top = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0)
+ if (top < 15 &&
!this.paused &&
!(this.unfocused && this.$store.state.config.pauseOnUnfocused)
) {