mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Use the "here" option to open for drag-and-drop
This commit is contained in:
@@ -263,7 +263,7 @@ describe "PaneElement", ->
|
||||
event = buildDragEvent("drop", [{path: "/fake1"}, {path: "/fake2"}])
|
||||
paneElement.dispatchEvent(event)
|
||||
expect(atom.applicationDelegate.open.callCount).toBe 1
|
||||
expect(atom.applicationDelegate.open.argsForCall[0][0]).toEqual pathsToOpen: ['/fake1', '/fake2']
|
||||
expect(atom.applicationDelegate.open.argsForCall[0][0]).toEqual pathsToOpen: ['/fake1', '/fake2'], here: true
|
||||
|
||||
describe "when a non-file is dragged to the pane", ->
|
||||
it "does nothing", ->
|
||||
|
||||
@@ -62,7 +62,7 @@ class PaneElement extends HTMLElement {
|
||||
this.getModel().activate()
|
||||
const pathsToOpen = [...event.dataTransfer.files].map(file => file.path)
|
||||
if (pathsToOpen.length > 0) {
|
||||
this.applicationDelegate.open({pathsToOpen})
|
||||
this.applicationDelegate.open({pathsToOpen, here: true})
|
||||
}
|
||||
}
|
||||
this.addEventListener('focus', handleFocus, true)
|
||||
|
||||
Reference in New Issue
Block a user