Bug 1285812 - Allow switching tabs by scrolling in the tab bar when it doesn't overflow. (Linux only) r=stransky
authorDão Gottwald <dao@mozilla.com>
Fri, 30 Nov 2018 14:36:15 +0000
changeset 448981 ffa678d05ff52183eb3f56a61234248cbd51a9cb
parent 448980 a657de42db91dc6b825d7146a80e29c9e3de4b06
child 448982 67670eab469be12d0626017f0bfedd6967d04320
push id35139
push userccoroiu@mozilla.com
push dateSat, 01 Dec 2018 02:30:08 +0000
treeherdermozilla-central@22425b629a9d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstransky
bugs1285812
milestone65.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 1285812 - Allow switching tabs by scrolling in the tab bar when it doesn't overflow. (Linux only) r=stransky Differential Revision: https://phabricator.services.mozilla.com/D13450
toolkit/content/widgets/scrollbox.xml
--- a/toolkit/content/widgets/scrollbox.xml
+++ b/toolkit/content/widgets/scrollbox.xml
@@ -413,16 +413,21 @@
 
       <field name="_isScrolling">false</field>
       <field name="_destination">0</field>
       <field name="_direction">0</field>
     </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)