mirror of
https://github.com/atom/atom.git
synced 2026-01-28 00:08:13 -05:00
only activate another tab if the pane's active tab wasn't dragged away
This commit is contained in:
@@ -51,12 +51,14 @@ class TabView extends SortableList
|
||||
|
||||
onDragStart: (event) =>
|
||||
super
|
||||
|
||||
pane = $(event.target).closest('.pane')
|
||||
paneIndex = rootView.indexOfPane(pane)
|
||||
event.originalEvent.dataTransfer.setData 'from-pane-index', paneIndex
|
||||
|
||||
onDrop: (event) =>
|
||||
super
|
||||
|
||||
transfer = event.originalEvent.dataTransfer
|
||||
previousDraggedTabIndex = transfer.getData 'sortable-index'
|
||||
|
||||
@@ -84,5 +86,5 @@ class TabView extends SortableList
|
||||
toEditor.setActiveEditSessionIndex(currentDraggedTabIndex)
|
||||
toEditor.focus()
|
||||
|
||||
if fromPaneIndex != toPaneIndex
|
||||
if fromPaneIndex != toPaneIndex && !draggedTab.hasClass('active')
|
||||
fromEditor.setActiveEditSessionIndex(0)
|
||||
|
||||
Reference in New Issue
Block a user