diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -1250,17 +1250,17 @@ // Add the Message and the Browser to the box var notificationbox = document.createElementNS( "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "notificationbox"); notificationbox.setAttribute("flex", "1"); notificationbox.appendChild(stack); - var position = this.tabs.length - 1; + var position = this.tabs.length - 1; var uniqueId = "panel" + Date.now() + position; notificationbox.id = uniqueId; t.linkedPanel = uniqueId; t.linkedBrowser = b; t._tPos = position; if (t.previousSibling.selected) t.setAttribute("afterselected", true); @@ -1330,16 +1330,18 @@ if (this._lastRelatedTab) this._lastRelatedTab.owner = null; else t.owner = this.selectedTab; this.moveTabTo(t, newTabPos); this._lastRelatedTab = t; } + this.moveTabTo(t, this.selectedTab._tPos + 1); + return t; ]]>