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:
parent
291f8a17bb
commit
59a83634c4
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue