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 505417 ffa678d05ff52183eb3f56a61234248cbd51a9cb
parent 505416 a657de42db91dc6b825d7146a80e29c9e3de4b06
child 505418 67670eab469be12d0626017f0bfedd6967d04320
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [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)