diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index 92fea2b6..4dc1d53c 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -42,6 +42,7 @@ var TreeStyleTabService = { kACTION_ATTACH : 2, kACTION_PART : 4, kACTION_DUPLICATE : 8, + kACTION_MOVE_FROM_OTHER_WINDOW : 16, kTABBAR_TOP : 1, kTABBAR_BOTTOM : 2, @@ -885,6 +886,12 @@ catch(e) { if (dropActionInfo.position == TreeStyleTabService.kDROP_ON) TSTTabBrowser.treeStyleTab.attachTabTo(newTab, dropActionInfo.target); ]]> + ).replace( // Firefox 3, dragging tab from another window + 'else if (draggedTab) {', + <> ).replace( /(this.loadOneTab\([^;]+\));/, <> aTab._tPos) newIndex--; + if (aInfo.insertBefore && newIndex > tab._tPos) newIndex--; self.internallyTabMoving = true; - b.moveTabTo(aTab, newIndex); - self.collapseExpandTab(aTab, false); + b.moveTabTo(tab, newIndex); + self.collapseExpandTab(tab, false); self.internallyTabMoving = false; + + if (remoteBrowser) + remoteBrowser.removeTab(aTab); }); if (aInfo.action & this.kACTION_DUPLICATE && aInfo.action & this.kACTION_ATTACH) this.attachTabsOnDrop(newRoots, aInfo.parent); + if (windowShouldBeClosed) + remoteWindow.close(); + b.movingSelectedTabs = false; // Multiple Tab Handler b.duplicatingSelectedTabs = false; // Multiple Tab Handler }