1
0
mirror of https://github.com/flarum/core.git synced 2025-02-21 09:42:53 +01:00

make scroll listener passive (#2387)

see: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
This commit is contained in:
Wadim Kalmykov 2020-10-16 01:30:32 +07:00 committed by GitHub
parent 008f1da539
commit 20b9455f04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,7 @@ export default class ScrollListener {
*/
start() {
if (!this.active) {
window.addEventListener('scroll', (this.active = this.loop.bind(this)));
window.addEventListener('scroll', (this.active = this.loop.bind(this)), { passive: true });
}
}