Bug 1558596 - Make middleclick close tabs on all platforms. r=frg
authorIan Neal <iann_cvs@blueyonder.co.uk>
Thu, 13 Jun 2019 21:42:05 +0200
changeset 35857 c7602463fd80d2f00e012bcbb3c172b3754e0724
parent 35856 276536b6d831f5b580a71dfe6d146fafcf509545
child 35858 4c8023a1601737c97066fcd6a35be835b3497e2c
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersfrg
bugs1558596
Bug 1558596 - Make middleclick close tabs on all platforms. r=frg imported patch 1558596_middleclick_tab_close.patch
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)