bug 311136 - Tab dnd can confuse tabbrowser, r=vladimir

This commit is contained in:
mconnor@steelgryphon.com 2007-08-21 22:00:44 -07:00
parent 7009735701
commit 19e4ec716b

View File

@ -1591,7 +1591,11 @@
aIndex = aIndex < aTab._tPos ? aIndex: aIndex+1;
this.mCurrentTab.selected = false;
this.mTabContainer.insertBefore(aTab, this.mTabContainer.childNodes[aIndex]);
if (this.mTabContainer.childNodes.length == aIndex)
this.mTabContainer.appendChild(aTab);
else
this.mTabContainer.insertBefore(aTab, this.mTabContainer.childNodes[aIndex]);
var i;
for (i = 0; i < this.mTabContainer.childNodes.length; i++) {
this.mTabContainer.childNodes[i]._tPos = i;