Explicitly marking some wheel handlers as non-passive
authorAlexander Ebert <ebert@woltlab.com>
Mon, 4 Dec 2017 10:15:31 +0000 (11:15 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 4 Dec 2017 10:15:31 +0000 (11:15 +0100)
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
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js

index 4b227a1f08a9689d3cd9e0cf97472fa792b7b465..c4322e343b3d0b5eb1f9bb8c89f7238e2ee1dff6 100644 (file)
@@ -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) {
index 1d652b2d2300a39d21dee65916683005e0a6d7d3..3b8dd92b74cf7462406b528e8cbe6182c8d9eb0a 100644 (file)
@@ -111,7 +111,7 @@ define(
                                                else if (event.deltaY > 0 && (menu.scrollTop + menuHeight === menuRealHeight)) {
                                                        event.preventDefault();
                                                }
-                                       });
+                                       }, { passive: false });
                                }
                        }