From 6411000eecf39863a4656742082099f046a414e5 Mon Sep 17 00:00:00 2001 From: piro Date: Wed, 30 Sep 2009 23:52:31 +0000 Subject: [PATCH] =?UTF-8?q?=E3=83=AB=E3=83=BC=E3=83=88=E3=81=AE=E3=82=BF?= =?UTF-8?q?=E3=83=96=E3=81=AE=E4=B8=A6=E3=81=B3=E9=A0=86=E3=81=8C=E5=A3=8A?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E3=81=93=E3=81=A8=E3=81=8C=E3=81=82=E3=81=A3?= =?UTF-8?q?=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5169 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletabbrowser.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 40a8e5f7..6d90544b 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -1853,7 +1853,6 @@ TreeStyleTabBrowser.prototype = { if (parent) { this.attachTabTo(tab, parent, { dontExpand : true, - insertBefore : nextTab, dontUpdateIndent : true, dontAnimate : aWithoutAnimation }); @@ -1873,7 +1872,10 @@ TreeStyleTabBrowser.prototype = { } if (!parent) { - if (!nextTab) nextTab = this.getNextTab(tab); + if (nextTab == tab) + nextTab = this.getNextSiblingTab(tab); + else if (!nextTab) + nextTab = this.getNextTab(tab); let parentOfNext = this.getParentTab(nextTab); let newPos = -1; if (parentOfNext) { @@ -1884,6 +1886,9 @@ TreeStyleTabBrowser.prototype = { newPos = nextTab._tPos; if (newPos > tab._tPos) newPos--; } + else { + newPos = this.getTabs(b).snapshotLength - 1; + } if (newPos > -1) b.moveTabTo(tab, newPos); }