Bug 1285812 - Allow switching tabs by scrolling in the tab bar when it doesn't overflow. draft
authorDão Gottwald <dao@mozilla.com>
Wed, 15 Nov 2017 12:37:33 +0100
changeset 698271 7dd2374816d9eef117115478793ff2174a40db7b
parent 698261 45715ece25fcb064eee4f977ebd842d44a87f22b
child 740323 ffcd0cb6d8863d8599c93c7dae99d35e114af49e
push id89230
push userdgottwald@mozilla.com
push dateWed, 15 Nov 2017 11:37:57 +0000
bugs1285812
milestone59.0a1
Bug 1285812 - Allow switching tabs by scrolling in the tab bar when it doesn't overflow. MozReview-Commit-ID: IZJtlmiumhH
toolkit/content/widgets/scrollbox.xml
--- 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)