デフォルトのタブのフォーカス制御処理が働かなくなっていたのを修正

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4638 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-07-06 15:36:43 +00:00
parent 24874a4402
commit ee70014ccc
2 changed files with 20 additions and 5 deletions

View File

@ -526,8 +526,8 @@ var TreeStyleTabService = {
return ( return (
this.expandTwistyArea && this.expandTwistyArea &&
this._expandTwistyAreaAllowance.every(function(aFunc) { this._expandTwistyAreaAllowance.every(function(aFunc) {
return aFunc(aTabBrowser); return aFunc.call(this, aTabBrowser);
}) }, this)
); );
}, },
expandTwistyArea : true, expandTwistyArea : true,
@ -1160,9 +1160,24 @@ var TreeStyleTabService = {
); );
this.overrideExtensionsPreInit(); // hacks.js this.overrideExtensionsPreInit(); // hacks.js
this.registerTabFocusAllowance(this.defaultTabFocusAllowance);
}, },
preInitialized : false, preInitialized : false,
defaultTabFocusAllowance : function(aBrowser)
{
var tab = aBrowser.selectedTab;
return (
!this.getPref('browser.tabs.selectOwnerOnClose') ||
!tab.owner ||
(
aBrowser._removingTabs &&
aBrowser._removingTabs.indexOf(tab.owner) > -1
)
);
},
init : function() init : function()
{ {
if (!('gBrowser' in window)) return; if (!('gBrowser' in window)) return;

View File

@ -1516,8 +1516,8 @@ TreeStyleTabBrowser.prototype = {
nextFocusedTab && nextFocusedTab &&
b.selectedTab == tab && b.selectedTab == tab &&
this._tabFocusAllowance.every(function(aFunc) { this._tabFocusAllowance.every(function(aFunc) {
return aFunc(b); return aFunc.call(this, b);
}) }, this)
) )
b.selectedTab = nextFocusedTab; b.selectedTab = nextFocusedTab;