FIX: Use scrollY for current scroll position

This replaces an invalid `window.scrollTop` occurrence, left over from a
jQuery refactoring. It should fix an undesirable "shake effect" I have
run into in Safari when navigating to a reply in the post stream.
This commit is contained in:
Penar Musaraj 2020-09-23 10:15:58 -04:00
parent 291f8a17bb
commit 59a83634c4
No known key found for this signature in database
GPG Key ID: E390435D881FF0F7
1 changed files with 1 additions and 4 deletions

View File

@ -113,10 +113,7 @@ export default class LockOn {
return this.clearLock();
}
if (
!within(4, top, this.previousTop) ||
!within(4, window.scrollTop, top)
) {
if (!within(4, top, this.previousTop) || !within(4, window.scrollY, top)) {
window.scrollTo(window.pageXOffset, top);
this.previousTop = top;
}