fix: scrollEvent delay

This commit is contained in:
Dillon 2022-05-10 21:59:42 +08:00
parent 14cb2c2db9
commit 8d031cf268
No known key found for this signature in database
GPG key ID: 0EF4AE57FB98F108
2 changed files with 3 additions and 12 deletions

View file

@ -931,15 +931,9 @@ var Theme = /*#__PURE__*/function () {
_step2; _step2;
try { try {
var _loop = function _loop() {
var event = _step2.value;
window.setTimeout(function () {
event();
}, 100);
};
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
_loop(); var event = _step2.value;
event();
} }
} catch (err) { } catch (err) {
_iterator2.e(err); _iterator2.e(err);
@ -947,7 +941,6 @@ var Theme = /*#__PURE__*/function () {
_iterator2.f(); _iterator2.f();
} }
;
_this12.oldScrollTop = _this12.newScrollTop; _this12.oldScrollTop = _this12.newScrollTop;
}, false); }, false);
} }

View file

@ -689,9 +689,7 @@ class Theme {
} }
$fixedButtons.style.display = 'none'; $fixedButtons.style.display = 'none';
} }
for (let event of this.scrollEventSet) window.setTimeout(() => { for (let event of this.scrollEventSet) event();
event();
}, 100);;
this.oldScrollTop = this.newScrollTop; this.oldScrollTop = this.newScrollTop;
}, false); }, false);
} }