From 67452923a5446108ee042f489f906199ebfb531e Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Sat, 3 Jun 2017 19:53:23 +0300 Subject: [PATCH] Hotfix for firefox to prevent loading on every scroll event. --- src/components/timeline/timeline.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() } }