summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-07-30 16:13:47 +0300
committerAndrew Dolgov <[email protected]>2019-07-30 16:13:47 +0300
commitd172abb037b7227244eeaa41aa1d44ea0209b668 (patch)
treeb06f0c070a239c1b56e861f43e51d2006e983add /js
parentc35a618b00b5c7a0462113d8882c5275c23500ac (diff)
scroll handler: also invoke lazy load if last article in buffer is currently active
Diffstat (limited to 'js')
-rwxr-xr-xjs/Headlines.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/Headlines.js b/js/Headlines.js
index 6abda030a..3c98bef6c 100755
--- a/js/Headlines.js
+++ b/js/Headlines.js
@@ -279,8 +279,8 @@ define(["dojo/_base/declare"], function (declare) {
if (hsp && hsp.previousSibling) {
const last_row = hsp.previousSibling;
- // invoke lazy load if last article in buffer is nearly visible
- if (last_row.offsetTop - 250 <= container.scrollTop + container.offsetHeight) {
+ // invoke lazy load if last article in buffer is nearly visible OR is active
+ if (Article.getActive() == last_row.getAttribute("data-article-id") || last_row.offsetTop - 250 <= container.scrollTop + container.offsetHeight) {
hsp.innerHTML = "<span class='loading'><img src='images/indicator_tiny.gif'> " +
__("Loading, please wait...") + "</span>";