From: Alexander Ebert Date: Mon, 4 Dec 2017 10:15:31 +0000 (+0100) Subject: Explicitly marking some wheel handlers as non-passive X-Git-Tag: 3.1.0_Beta_4~25 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5a62126636adb7706ad3d65c5d4f89f09a9032ec;p=GitHub%2FWoltLab%2FWCF.git 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. --- 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 }); } }