extensions.treestyletab.closeRootBehavior should work only if extensions.treestyletab.closeParentBehavior is 0. (fix for https://github.com/piroor/treestyletab/issues/84 , regression)

This commit is contained in:
Piro / SHIMODA Hiroshi 2011-04-27 01:24:33 +09:00
parent 17b14e88fd
commit 7664824d99

View File

@ -4265,9 +4265,9 @@ TreeStyleTabBrowser.prototype = {
var parentTab = this.getParentTab(aTab); var parentTab = this.getParentTab(aTab);
var behavior = aDefaultBehavior ? var behavior = aDefaultBehavior ?
aDefaultBehavior : aDefaultBehavior :
parentTab ? (!parentTab && closeParentBehavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_ALL_CHILDREN) ?
closeParentBehavior : closeRootBehavior :
closeRootBehavior ; closeParentBehavior ;
if (behavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_FIRST_CHILD && if (behavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_FIRST_CHILD &&
parentTab && parentTab &&
this.getChildTabs(parentTab).length == 1) this.getChildTabs(parentTab).length == 1)