Bug 1558596 - Make middleclick close tabs on all platforms. r=frg a=frg
authorIan Neal <iann_cvs@blueyonder.co.uk>
Thu, 13 Jun 2019 21:49:24 +0200
changeset 32219 e9a60dce159b648b304025fb82c6448171fd7256
parent 32218 ee0685ffa4a060f17bb51b054e52d49f60ef7abd
child 32220 710d3d6770c06e2f7a63e8b12f0397f3c1cc593f
push id196
push userfrgrahl@gmx.net
push dateThu, 13 Jun 2019 19:52:22 +0000
treeherdercomm-esr60@9c7bd67f0912 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrg, frg
bugs1558596
Bug 1558596 - Make middleclick close tabs on all platforms. r=frg a=frg
suite/browser/tabbrowser.xml
suite/mailnews/content/tabmail.xml
--- a/suite/browser/tabbrowser.xml
+++ b/suite/browser/tabbrowser.xml
@@ -1188,19 +1188,19 @@
           ]]>
         </body>
       </method>
 
       <method name="onTabClick">
         <parameter name="event"/>
         <body>
           <![CDATA[
-            if (event.button != 1 || event.target.localName != 'tab' ||
-                (Services.prefs.getBoolPref("middlemouse.contentLoadURL") &&
-                !Services.prefs.getBoolPref("general.autoScroll")))
+            // A middle mouse button click on a tab is a short cut for
+            // closing that tab.
+            if (event.button != 1 || event.target.localName != 'tab')
               return;
 
             this.removeTab(event.target);
             event.stopPropagation();
           ]]>
         </body>
       </method>
 
--- a/suite/mailnews/content/tabmail.xml
+++ b/suite/mailnews/content/tabmail.xml
@@ -666,29 +666,16 @@
             if (!this.currentTabInfo)
               this.currentTabInfo = this.tabInfo[0];
             // save the old tab state before we change the current tab
             this.saveTabState(this.currentTabInfo);
           ]]>
         </body>
       </method>
 
-      <method name="onTabClick">
-        <parameter name="event"/>
-        <body>
-          <![CDATA[
-            // a middle mouse button click on a tab is a short cut for closing a tab
-            if (event.button != 1 || event.target.localName != "tab")
-              return;
-            this.removeTab(event.target);
-            event.stopPropagation();
-          ]]>
-        </body>
-      </method>
-
       <method name="setTabTitle">
         <parameter name="aTabInfo"/>
         <body>
           <![CDATA[
             // First find the tab and its index.
             let tabInfo;
             let index;
             if (aTabInfo)