prioritize scrolling down

This commit is contained in:
Barbara Miller 2019-11-14 17:46:34 -08:00
parent ef70907040
commit 9001449c70

View File

@ -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();
}