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 idunknown
push userunknown
push dateunknown
reviewersGijs
bugs1008172
milestone37.0a1
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 ()
   {