Merge pull request #180 from galgeek/UmbraBFB

scroll down, and down, then scroll up
This commit is contained in:
Noah Levitt 2019-11-15 11:08:29 -08:00 committed by GitHub
commit 3136eefb77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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