mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Allow dragging of tab when there is only one tab.
The tabs should be able to be draggale out of the application at any time, and if there is only one tab it should not be able to be dropped in the same window.
This commit is contained in:
@@ -77,11 +77,8 @@ class TabBarView extends View
|
||||
(@paneContainer.getPanes().length > 1) or (@pane.getItems().length > 1)
|
||||
|
||||
onDragStart: (event) =>
|
||||
unless @shouldAllowDrag(event)
|
||||
event.preventDefault()
|
||||
return
|
||||
|
||||
event.originalEvent.dataTransfer.setData 'atom-event', 'true'
|
||||
if @shouldAllowDrag()
|
||||
event.originalEvent.dataTransfer.setData 'atom-event', 'true'
|
||||
|
||||
el = $(event.target).closest('.sortable')
|
||||
el.addClass 'is-dragging'
|
||||
|
||||
Reference in New Issue
Block a user