mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 22:53:43 +08:00
FIX: attempts to exit lock-on early (#21949)
This commit is contained in:
parent
9661a8c214
commit
ad0a8cccc8
|
@ -120,9 +120,11 @@ export default class LockOn {
|
|||
return this.clearLock();
|
||||
}
|
||||
|
||||
if (!within(4, top, this.previousTop) || !within(4, window.scrollY, top)) {
|
||||
if (!within(4, top, this.previousTop)) {
|
||||
window.scrollTo(window.pageXOffset, top);
|
||||
this.previousTop = top;
|
||||
} else {
|
||||
return this.clearLock();
|
||||
}
|
||||
|
||||
// Stop early when maintaining the original offset
|
||||
|
|
Loading…
Reference in New Issue
Block a user