Add a secret preference to disable the safeguard for infinity promoting of all children #988
This commit is contained in:
parent
184555c3fa
commit
34278450e1
@ -565,6 +565,25 @@ pref("extensions.treestyletab.closeParentBehavior", 3);
|
||||
* if this is "true". Otherwise the new position is between [A-2-2] and [B].
|
||||
*/
|
||||
pref("extensions.treestyletab.closeParentBehavior.moveDetachedTabsToBottom", false);
|
||||
/**
|
||||
* When closeParentBehavior = 3, you'll see infinity promoting for all children like:
|
||||
* +[A]
|
||||
* +[A-1]
|
||||
* +[A-1-1]
|
||||
* +[A-1-2]
|
||||
* +[A-1-3]
|
||||
* (close A-1)=>
|
||||
* +[A]
|
||||
* +[A-1-1]
|
||||
* +[A-1-2]
|
||||
* +[A-1-3]
|
||||
* (close A-1-1)=>
|
||||
* +[A]
|
||||
* +[A-1-2]
|
||||
* +[A-1-3]
|
||||
* This preference prevents such an annoying behavior. However, you can disable this safeguard if you don't want.
|
||||
*/
|
||||
pref("extensions.treestyletab.closeParentBehavior.promoteAllChildrenWhenParentIsLastChild", true);
|
||||
/**
|
||||
* How to treat children of a closed root tab (which has no parent).
|
||||
* 3 = Promote the first child tab to the new root.
|
||||
|
@ -5737,7 +5737,8 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
|
||||
// This is similar to "taking by representation".
|
||||
if (behavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_FIRST_CHILD &&
|
||||
parentTab &&
|
||||
this.getChildTabs(parentTab).length == 1)
|
||||
this.getChildTabs(parentTab).length == 1 &&
|
||||
utils.getTreePref('closeParentBehavior.promoteAllChildrenWhenParentIsLastChild'))
|
||||
behavior = this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_ALL_CHILDREN;
|
||||
|
||||
return behavior;
|
||||
|
Loading…
Reference in New Issue
Block a user