diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index 571ff2d6ea9..f0ce3ce4700 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -317,6 +317,7 @@ openUILinkIn(url, "current", { allowThirdPartyFixup: true, disallowInheritPrincipal: !mayInheritPrincipal, + allowPinnedTabHostChange: true, postData: postData }); } diff --git a/browser/base/content/utilityOverlay.js b/browser/base/content/utilityOverlay.js index 039bfe8468e..3dca6c5b073 100644 --- a/browser/base/content/utilityOverlay.js +++ b/browser/base/content/utilityOverlay.js @@ -185,6 +185,7 @@ function whereToOpenLink( e, ignoreButton, ignoreAlt ) * referrerURI (nsIURI) * relatedToCurrent (boolean) * skipTabAnimation (boolean) + * allowPinnedTabHostChange (boolean) */ function openUILinkIn(url, where, aAllowThirdPartyFixup, aPostData, aReferrerURI) { var params; @@ -220,6 +221,7 @@ function openLinkIn(url, where, params) { var aInitiatingDoc = params.initiatingDoc; var aIsPrivate = params.private; var aSkipTabAnimation = params.skipTabAnimation; + var aAllowPinnedTabHostChange = !!params.allowPinnedTabHostChange; if (where == "save") { if (!aInitiatingDoc) { @@ -288,7 +290,8 @@ function openLinkIn(url, where, params) { } catch (e) {} } - if (where == "current" && w.gBrowser.selectedTab.pinned) { + if (where == "current" && w.gBrowser.selectedTab.pinned && + !aAllowPinnedTabHostChange) { try { // nsIURI.host can throw for non-nsStandardURL nsIURIs. if (!uriObj || (!uriObj.schemeIs("javascript") &&