From 5a62126636adb7706ad3d65c5d4f89f09a9032ec Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 4 Dec 2017 11:15:31 +0100 Subject: [PATCH] Explicitly marking some wheel handlers as non-passive Suppresses the generic warning in Chrome on passive listeners. None of these listeners affect the page scroll, but are instead scoped to very specific elements. Additionally, these listeners are supposed to be not passive due to their coniditional blocking. --- wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js | 4 ++-- .../install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js index 4b227a1f08..c4322e343b 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js @@ -53,7 +53,7 @@ define( if (event.target === _container) { event.preventDefault(); } - }); + }, { passive: false }); elById('content').appendChild(_container); @@ -375,7 +375,7 @@ define( if (allowScroll === false) { event.preventDefault(); } - }); + }, { passive: false }); var content; if (element === null) { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js index 1d652b2d23..3b8dd92b74 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js @@ -111,7 +111,7 @@ define( else if (event.deltaY > 0 && (menu.scrollTop + menuHeight === menuRealHeight)) { event.preventDefault(); } - }); + }, { passive: false }); } } -- 2.20.1