From c03ad9eaffe84a040eae4315d44a18f7ea68a446 Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Tue, 2 Jul 2013 19:47:41 +0900 Subject: [PATCH] Detect new tabs opened from content scripts correctly (#517, #510) --- modules/window.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/window.js b/modules/window.js index 7a485646..678b206d 100644 --- a/modules/window.js +++ b/modules/window.js @@ -1138,7 +1138,7 @@ TreeStyleTabWindow.prototype = { onBeforeBrowserAccessOpenURI : function TSTWindow_onBeforeBrowserAccessOpenURI(aOpener, aWhere) { if (aOpener && - aOpener.top == this.browser.contentWindow && + this.getTabFromFrame(aOpener.top) && aWhere == Ci.nsIBrowserDOMWindow.OPEN_NEWTAB) this.handleNewTabFromCurrent(aOpener); },