Closed ahuth closed 9 years ago
If the tabs package stops stopPropagation on the tabs events, list for the 'drop' event on the pane:
stopPropagation
initialize: (@paneView) -> @preview = null @pane = paneView.model @subscriptions = paneItemAdded: @pane.onDidAddItem @_onPaneItemAdded treeEntryDoubleClicked: new PreviewTabsEventHandler(atom.workspaceView, "dblclick", ".tree-view .file", @_onTreeEntryDoubleClicked) onDropped: new PreviewTabsEventHandler(@paneView, "drop", ".tab-bar", @_onTabDropped)
Add a test to the PreviewTabsView spec under 'adding pane items':
describe "when a tab is dropped into the pane", -> tabBar = null beforeEach -> tabBar = $(document.createElement("ul")).addClass("tab-bar") pane.prepend(tabBar) afterEach -> tabBar.remove() it "keeps the dropped tab", -> pane.addItem(editor) expect(previewTabsView.preview).toBeTruthy() tabBar.trigger("drop") expect(previewTabsView.preview).toBeFalsy()
If the tabs package stops
stopPropagation
on the tabs events, list for the 'drop' event on the pane:Add a test to the PreviewTabsView spec under 'adding pane items':