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

View file

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