Tab Mix Plusでブックマークグループを開いた時にツリーが壊れる問題を修正
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1572 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
f13d6137d3
commit
625aa8a334
@ -258,11 +258,32 @@ TreeStyleTabService.overrideExtensions = function() {
|
|||||||
|
|
||||||
eval('TMP_Bookmark.openGroup = '+
|
eval('TMP_Bookmark.openGroup = '+
|
||||||
TMP_Bookmark.openGroup.toSource().replace(
|
TMP_Bookmark.openGroup.toSource().replace(
|
||||||
/(tabToSelect = aTab;)/,
|
/(var tabToSelect = null;)/,
|
||||||
'$1 TreeStyleTabService.readyToOpenChildTab(tabToSelect, true);'
|
<><![CDATA[
|
||||||
|
$1
|
||||||
|
browser.__treestyletab__internallyTabMoving = true;
|
||||||
|
]]></>
|
||||||
|
).replace(
|
||||||
|
'index = prevTab._tPos + 1;',
|
||||||
|
<><![CDATA[
|
||||||
|
index = TreeStyleTabService.getNextSiblingTab(TreeStyleTabService.getRootTab(prevTab));
|
||||||
|
if (tabToSelect == aTab) index = TreeStyleTabService.getNextSiblingTab(index);
|
||||||
|
index = index ? index._tPos : (prevTab._tPos + 1);
|
||||||
|
]]></>
|
||||||
|
).replace(
|
||||||
|
/(prevTab = aTab;)/,
|
||||||
|
<><![CDATA[
|
||||||
|
$1
|
||||||
|
if (tabToSelect == aTab) {
|
||||||
|
TreeStyleTabService.readyToOpenChildTab(tabToSelect, true, TreeStyleTabService.getNextSiblingTab(tabToSelect));
|
||||||
|
}
|
||||||
|
]]></>
|
||||||
).replace(
|
).replace(
|
||||||
/(browser.mTabContainer.nextTab)/,
|
/(browser.mTabContainer.nextTab)/,
|
||||||
'TreeStyleTabService.stopToOpenChildTab(tabToSelect); $1'
|
<><![CDATA[
|
||||||
|
TreeStyleTabService.stopToOpenChildTab(tabToSelect);
|
||||||
|
browser.__treestyletab__internallyTabMoving = false;
|
||||||
|
$1]]></>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1854,6 +1854,17 @@ catch(e) {
|
|||||||
).singleNodeValue;
|
).singleNodeValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getRootTab : function(aTab)
|
||||||
|
{
|
||||||
|
var parent = aTab;
|
||||||
|
var root = aTab;
|
||||||
|
while (parent = this.getParentTab(parent))
|
||||||
|
{
|
||||||
|
root = parent;
|
||||||
|
}
|
||||||
|
return root;
|
||||||
|
},
|
||||||
|
|
||||||
getNextSiblingTab : function(aTab)
|
getNextSiblingTab : function(aTab)
|
||||||
{
|
{
|
||||||
if (!aTab) return null;
|
if (!aTab) return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user