ダミーのタブを自動的に閉じるタイミングを変更

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4646 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-07-07 01:15:13 +00:00
parent da3b721180
commit 0f22fc0682

View File

@ -1496,7 +1496,7 @@ TreeStyleTabBrowser.prototype = {
while (ancestor = this.getParentTab(ancestor));
backupAttributes[this.kANCESTOR] = ancestors.join('|');
var shouldCloseParentTab = (
let shouldCloseParentTab = (
this.isGroupTab(parentTab) &&
this.getDescendantTabs(parentTab).length == 1
);
@ -1507,10 +1507,15 @@ TreeStyleTabBrowser.prototype = {
if (shouldCloseParentTab) {
// when closing the last tab on Firefox 3.0
if (!this.getPref('browser.tabs.closeWindowWithLastTab') &&
this.getTabs(b).snapshotLength == 2)
b.addTab('about:blank');
b.removeTab(parentTab);
let shouldAddBlankTab = (
!this.getPref('browser.tabs.closeWindowWithLastTab') &&
this.getTabs(b).snapshotLength == 2
);
window.setTimeout(function() {
if (!parentTab.parentNode) return;
if (shouldAddBlankTab) b.addTab('about:blank');
b.removeTab(parentTab);
}, 0);
}
}
else if (!nextFocusedTab) {