Bug 1519160 - Restore middle click & double click on tabstrip to open new tabs r=dao
authorTimothy Guan-tin Chien <timdream@gmail.com>
Fri, 11 Jan 2019 15:19:39 +0000
changeset 453508 fd2b5b6a3048f5e7680508b4dc2900f4d3e56480
parent 453507 b6a0a003d609b4d67490367ef717a66fa48dfada
child 453509 eace4709948cdf060a36a60c00eeb286cb7acb17
push id35357
push usernerli@mozilla.com
push dateFri, 11 Jan 2019 21:54:07 +0000
treeherdermozilla-central@0ce024c91511 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1519160
milestone66.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 1519160 - Restore middle click & double click on tabstrip to open new tabs r=dao Wich the scrollbox binding gone the tag name to check should be "scrollbox" instead of "box". Differential Revision: https://phabricator.services.mozilla.com/D16236
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1254,17 +1254,17 @@
       <handler event="dblclick"><![CDATA[
         // When the tabbar has an unified appearance with the titlebar
         // and menubar, a double-click in it should have the same behavior
         // as double-clicking the titlebar
         if (TabsInTitlebar.enabled || this.parentNode._dragBindingAlive)
           return;
 
         if (event.button != 0 ||
-            event.originalTarget.localName != "box")
+            event.originalTarget.localName != "scrollbox")
           return;
 
         if (!this._blockDblClick)
           BrowserOpenTab();
 
         event.preventDefault();
       ]]></handler>
 
@@ -1327,17 +1327,17 @@
           return;
         }
 
         if (event.target.localName == "tab") {
           gBrowser.removeTab(event.target, {
             animate: true,
             byMouse: event.mozInputSource == MouseEvent.MOZ_SOURCE_MOUSE,
           });
-        } else if (event.originalTarget.localName == "box") {
+        } else if (event.originalTarget.localName == "scrollbox") {
           // The user middleclicked an open space on the tabstrip. This could
           // be because they intend to open a new tab, but it could also be
           // because they just removed a tab and they now middleclicked on the
           // resulting space while that tab is closing. In that case, we don't
           // want to open a tab. So if we're removing one or more tabs, and
           // the tab click is before the end of the last visible tab, we do
           // nothing.
           if (gBrowser._removingTabs.length) {