Bug 1285812 - Allow switching tabs by scrolling in the tab bar when it doesn't overflow.
MozReview-Commit-ID: IZJtlmiumhH
--- a/toolkit/content/widgets/scrollbox.xml
+++ b/toolkit/content/widgets/scrollbox.xml
@@ -457,16 +457,21 @@
}, 0);
});
]]></body>
</method>
</implementation>
<handlers>
<handler event="wheel"><![CDATA[
+ // Don't consume the event if we can't scroll.
+ if (this.hasAttribute("notoverflowing")) {
+ return;
+ }
+
let doScroll = false;
let instant;
let scrollAmount = 0;
if (this.orient == "vertical") {
doScroll = true;
if (event.deltaMode == event.DOM_DELTA_PIXEL)
scrollAmount = event.deltaY;
else if (event.deltaMode == event.DOM_DELTA_PAGE)