Bug 1008172 - Scrolling when focused on the tabbox should not change the selected tab for the in-content preferences. r=Gijs
--- 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 ()
{