Bug 1039904 - Changing the URL in a pinned tab shouldn't open a new tab. r=gavin
This commit is contained in:
@@ -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") &&
|
||||
|
||||
Reference in New Issue
Block a user