From 9001449c7044278c0f364a298284a86a4959067f Mon Sep 17 00:00:00 2001 From: Barbara Miller Date: Thu, 14 Nov 2019 17:46:34 -0800 Subject: [PATCH] prioritize scrolling down --- brozzler/js-templates/umbraBehavior.js.j2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/brozzler/js-templates/umbraBehavior.js.j2 b/brozzler/js-templates/umbraBehavior.js.j2 index 0cdf232..3e04e1c 100644 --- a/brozzler/js-templates/umbraBehavior.js.j2 +++ b/brozzler/js-templates/umbraBehavior.js.j2 @@ -129,12 +129,12 @@ class UmbraBehavior { } if (!didSomething) { - if (somethingLeftAbove) { - window.scrollBy(0, -500); - this.idleSince = null; - } else if (somethingLeftBelow || ( (window.scrollY + window.innerHeight) < document.documentElement.scrollHeight)) { + if (somethingLeftBelow || ( (window.scrollY + window.innerHeight) < document.documentElement.scrollHeight)) { window.scrollBy(0, 200); this.idleSince = null; + } else if (somethingLeftAbove) { + window.scrollBy(0, -500); + this.idleSince = null; } else if (this.idleSince == null) { this.idleSince = Date.now(); }