Add passive: false
when removing wheel listeners
Code of listening `wheel` event uses `{passive: false}`, while this argument will be treated as `true` before Firefox 49, accordin to https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Browser_compatibility . This commit adds it when removing wheel listeners, so that such listeners can be really removed.
This commit is contained in:
parent
475fa1f97f
commit
a527eb8c92
@ -1719,7 +1719,7 @@ const PDFViewerApplication = {
|
||||
const { _boundEvents } = this;
|
||||
|
||||
window.removeEventListener("visibilitychange", webViewerVisibilityChange);
|
||||
window.removeEventListener("wheel", webViewerWheel);
|
||||
window.removeEventListener("wheel", webViewerWheel, { passive: false });
|
||||
window.removeEventListener("click", webViewerClick);
|
||||
window.removeEventListener("keydown", webViewerKeyDown);
|
||||
window.removeEventListener("resize", _boundEvents.windowResize);
|
||||
|
@ -437,7 +437,9 @@ class PDFPresentationMode {
|
||||
_removeWindowListeners() {
|
||||
window.removeEventListener("mousemove", this.showControlsBind);
|
||||
window.removeEventListener("mousedown", this.mouseDownBind);
|
||||
window.removeEventListener("wheel", this.mouseWheelBind);
|
||||
window.removeEventListener("wheel", this.mouseWheelBind, {
|
||||
passive: false,
|
||||
});
|
||||
window.removeEventListener("keydown", this.resetMouseScrollStateBind);
|
||||
window.removeEventListener("contextmenu", this.contextMenuBind);
|
||||
window.removeEventListener("touchstart", this.touchSwipeBind);
|
||||
|
Loading…
x
Reference in New Issue
Block a user