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 behavior = aDefaultBehavior ?
aDefaultBehavior :
parentTab ?
closeParentBehavior :
closeRootBehavior ;
(!parentTab && closeParentBehavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_ALL_CHILDREN) ?
closeRootBehavior :
closeParentBehavior ;
if (behavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_FIRST_CHILD &&
parentTab &&
this.getChildTabs(parentTab).length == 1)