diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index b2ce37f4..b9d9b0f7 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -1830,29 +1830,27 @@ TreeStyleTabBrowser.prototype = { MultipleTabService.allowMoveMultipleTabs ); - if (ownerWindow != window || moveSelection) { - if (moveSelection) { - draggedTabs = moveSelection ? ownerWindow.MultipleTabService.getSelectedTabs(ownerBrowser); - if (!(aInfo.action & this.kACTION_DUPLICATE)) { - draggedRoots = []; - draggedTabs.forEach(function(aTab) { - var parent = aTab, - current; - do { - current = parent; - parent = ownerBrowser.treeStyleTab.getParentTab(parent) - if (parent && ownerWindow.MultipleTabService.isSelected(parent)) continue; - draggedRoots.push(current); - return; - } - while (parent); - }); - } - } - else { - draggedTabs = draggedTabs.concat(ownerBrowser.treeStyleTab.getDescendantTabs(aDraggedTab)); + if (moveSelection) { + draggedTabs = ownerWindow.MultipleTabService.getSelectedTabs(ownerBrowser); + if (!(aInfo.action & this.kACTION_DUPLICATE)) { + draggedRoots = []; + draggedTabs.forEach(function(aTab) { + var parent = aTab, + current; + do { + current = parent; + parent = ownerBrowser.treeStyleTab.getParentTab(parent) + if (parent && ownerWindow.MultipleTabService.isSelected(parent)) continue; + draggedRoots.push(current); + return; + } + while (parent); + }); } } + else if (ownerWindow != window) { + draggedTabs = draggedTabs.concat(ownerBrowser.treeStyleTab.getDescendantTabs(aDraggedTab)); + } if (aDraggedTab && aInfo.action & this.kACTION_PART) { if (!(aInfo.action & this.kACTION_DUPLICATE))