FIX: iPad locking on was broken when posting.
This commit is contained in:
parent
97c1bb9159
commit
717999b302
|
@ -59,12 +59,11 @@ export default class LockOn {
|
||||||
const top = this.elementTop();
|
const top = this.elementTop();
|
||||||
const scrollTop = $(window).scrollTop();
|
const scrollTop = $(window).scrollTop();
|
||||||
|
|
||||||
if (typeof(top) === "undefined") {
|
if (typeof(top) === "undefined" || isNaN(top)) {
|
||||||
return this.clearLock(interval);
|
return this.clearLock(interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!within(4, top, previousTop) || !within(4, scrollTop, top)) {
|
if (!within(4, top, previousTop) || !within(4, scrollTop, top)) {
|
||||||
console.log(top, previousTop, scrollTop);
|
|
||||||
$(window).scrollTop(top);
|
$(window).scrollTop(top);
|
||||||
previousTop = top;
|
previousTop = top;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue