diff --git a/content/treestyletab/windowHelper.js b/content/treestyletab/windowHelper.js index 9a841008..242223f1 100644 --- a/content/treestyletab/windowHelper.js +++ b/content/treestyletab/windowHelper.js @@ -212,7 +212,7 @@ var TreeStyleTabWindowHelper = { eval('window.openLinkIn = '+ window.openLinkIn.toSource().replace( /((b|newTab = w\.gB)rowser.loadOneTab\()/g, - 'TreeStyleTabService.onBeforeOpenLinkWithTab(gBrowser.selectedTab); $1' + 'TreeStyleTabService.onBeforeOpenLinkWithTab(gBrowser.selectedTab, aFromChrome); $1' ) ); } diff --git a/modules/window.js b/modules/window.js index c41eee7a..be05fdbd 100644 --- a/modules/window.js +++ b/modules/window.js @@ -1213,9 +1213,9 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, { this.handleNewTabFromCurrent(aOwner); }, - onBeforeOpenLinkWithTab : function TSTWindow_onBeforeOpenLinkWithTab(aTab) + onBeforeOpenLinkWithTab : function TSTWindow_onBeforeOpenLinkWithTab(aTab, aFromChrome) { - if (aTab && !this.checkToOpenChildTab(aTab)) + if (!aFromChrome && aTab && !this.checkToOpenChildTab(aTab)) this.handleNewTabFromCurrent(aTab); },