From 66f9e4deb83a45609a6921a086dab09553c67b59 Mon Sep 17 00:00:00 2001 From: piro Date: Thu, 1 Oct 2009 00:18:03 +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@5172 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletabbrowser.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 40a8e5f7..9148cc2b 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -1920,15 +1920,13 @@ TreeStyleTabBrowser.prototype = { this.getNextSiblingTab(aTab) ; if (nextTab == this.getNextSiblingTab(aChild)) return; - let newPos; + let newPos = -1; if (nextTab) { newPos = nextTab._tPos; if (newPos > aChild._tPos) newPos--; } - else { - newPos = this.getTabs(this.mTabBrowser).snapshotLength - 1; - } - this.moveTabSubTreeTo(aChild, newPos); + if (newPos > -1) + this.moveTabSubTreeTo(aChild, newPos); }, this); children = aTab.getAttribute(this.kCHILDREN); }