diff --git a/src/browser/base/content/navigator-toolbox-js.patch b/src/browser/base/content/navigator-toolbox-js.patch index e29a351e4..15afc4341 100644 --- a/src/browser/base/content/navigator-toolbox-js.patch +++ b/src/browser/base/content/navigator-toolbox-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/base/content/navigator-toolbox.js b/browser/base/content/navigator-toolbox.js -index 15469e9d9b91c1eaef2578c9e43b6999edac3392..553402b41bc15f7cd99bf87c54416dc66d7c03e7 100644 +index 15469e9d9b91c1eaef2578c9e43b6999edac3392..95ae5036b57baeb5237603c0921f1e9252af6919 100644 --- a/browser/base/content/navigator-toolbox.js +++ b/browser/base/content/navigator-toolbox.js @@ -6,7 +6,7 @@ @@ -19,15 +19,25 @@ index 15469e9d9b91c1eaef2578c9e43b6999edac3392..553402b41bc15f7cd99bf87c54416dc6 #picture-in-picture-button, #urlbar-zoom-button, #star-button-box, -@@ -206,6 +207,7 @@ document.addEventListener( - case "vertical-tabs-newtab-button": - case "tabs-newtab-button": - case "new-tab-button": -+ case "zen-tabs-wrapper": +@@ -209,6 +210,17 @@ document.addEventListener( gBrowser.handleNewTabMiddleClick(element, event); break; -@@ -318,6 +320,7 @@ document.addEventListener( ++ case "zen-tabs-wrapper": ++ if (event.button == 1) { ++ BrowserCommands.openTab(); ++ // Stop the propagation of the click event, to prevent the event from being ++ // handled more than once. ++ // E.g. see https://bugzilla.mozilla.org/show_bug.cgi?id=1657992#c4 ++ event.stopPropagation(); ++ event.preventDefault(); ++ } ++ break; ++ + case "back-button": + case "forward-button": + case "reload-button": +@@ -318,6 +330,7 @@ document.addEventListener( #downloads-button, #fxa-toolbar-menu-button, #unified-extensions-button, @@ -35,7 +45,7 @@ index 15469e9d9b91c1eaef2578c9e43b6999edac3392..553402b41bc15f7cd99bf87c54416dc6 #library-button, #split-view-button `); -@@ -401,6 +404,16 @@ document.addEventListener( +@@ -401,6 +414,16 @@ document.addEventListener( gUnifiedExtensions.togglePanel(event); break;