Merge pull request #11747 from gdh1995/fix-removing-wheel

Add `passive: false` when removing wheel listeners
This commit is contained in:
Tim van der Meij 2020-03-25 22:37:41 +01:00 committed by GitHub
commit ff0f9fd018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -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);