Bug 1008172 - Scrolling when focused on the tabbox should not change the selected tab for the in-content preferences. r=Gijs
authorJared Wein <jwein@mozilla.com>
Fri, 12 Dec 2014 14:15:13 -0500
changeset 219497 26ec6656f074e2af1ad09623276e9dcfc30d8291
parent 219496 4cdd32ea6f7daa37948020e468038a2242d94e6e
child 219498 eb32947900a9ee686dcb45274050791fbf2a9f44
push id27964
push userkwierso@gmail.com
push dateSat, 13 Dec 2014 01:37:07 +0000
treeherdermozilla-central@f14dcd1c8c0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1008172
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1008172 - Scrolling when focused on the tabbox should not change the selected tab for the in-content preferences. r=Gijs
browser/components/preferences/in-content/advanced.js
--- a/browser/components/preferences/in-content/advanced.js
+++ b/browser/components/preferences/in-content/advanced.js
@@ -74,16 +74,25 @@ var gAdvancedPane = {
                      gAdvancedPane.updateWritePrefs);
     setEventListener("showUpdateHistory", "command",
                      gAdvancedPane.showUpdates);
 #endif
     setEventListener("viewCertificatesButton", "command",
                      gAdvancedPane.showCertificates);
     setEventListener("viewSecurityDevicesButton", "command",
                      gAdvancedPane.showSecurityDevices);
+
+#ifdef MOZ_WIDGET_GTK
+    // GTK tabbox' allow the scroll wheel to change the selected tab,
+    // but we don't want this behavior for the in-content preferences.
+    let tabsElement = document.getElementById("tabsElement");
+    tabsElement.addEventListener("DOMMouseScroll", event => {
+      event.stopPropagation();
+    }, true);
+#endif
   },
 
   /**
    * Stores the identity of the current tab in preferences so that the selected
    * tab can be persisted between openings of the preferences window.
    */
   tabSelectionChanged: function ()
   {