diff options
| author | Shpuld Shpuldson <shpuld@gmail.com> | 2017-06-03 12:59:05 -0400 |
|---|---|---|
| committer | Shpuld Shpuldson <shpuld@gmail.com> | 2017-06-03 12:59:05 -0400 |
| commit | c0b08d508c34fba9925e8e60c44ce3f818878e2b (patch) | |
| tree | f8e3ca5e61da389595391825e3605b71c1e04d46 | |
| parent | dcf030470dc42fbd518e3b4600b98cad1e06a84c (diff) | |
| parent | 67452923a5446108ee042f489f906199ebfb531e (diff) | |
Merge branch 'feature/autoloading-when-scrolled-to-bottom' into 'develop'
Hotfix for firefox to prevent loading on every scroll event.
See merge request !86
| -rw-r--r-- | src/components/timeline/timeline.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 6070e442..7aaa81c8 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -46,7 +46,8 @@ const Timeline = { }).then(() => store.commit('setLoading', { timeline: this.timelineName, value: false })) }, scrollLoad (e) { - if (this.timeline.loading === false && this.$store.state.config.autoLoad && (window.innerHeight + window.pageYOffset) >= (document.body.scrollHeight - 750)) { + let height = Math.max(document.body.offsetHeight, document.body.scrollHeight) + if (this.timeline.loading === false && this.$store.state.config.autoLoad && (window.innerHeight + window.pageYOffset) >= (height - 750)) { this.fetchOlderStatuses() } } |
