diff --git a/src/packages/tabs/lib/tab-view.coffee b/src/packages/tabs/lib/tab-view.coffee index 99715f815..02d315b41 100644 --- a/src/packages/tabs/lib/tab-view.coffee +++ b/src/packages/tabs/lib/tab-view.coffee @@ -82,9 +82,9 @@ class TabView extends SortableList currentDraggedTabIndex = draggedTab.index() toEditor.editSessions.splice(currentDraggedTabIndex, 0, fromEditor.editSessions.splice(previousDraggedTabIndex, 1)[0]) + if fromPaneIndex != toPaneIndex && draggedTab.hasClass('active') + fromEditor.setActiveEditSessionIndex(0) + @setActiveTab(currentDraggedTabIndex) toEditor.setActiveEditSessionIndex(currentDraggedTabIndex) toEditor.focus() - - if fromPaneIndex != toPaneIndex && !draggedTab.hasClass('active') - fromEditor.setActiveEditSessionIndex(0)