Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Fixed drog and drop for local files
Browse files Browse the repository at this point in the history
Resolves #3819

Auditors: @Sh1d0w @bradleyrichter

Test Plan:
- Open folder with a local file
- Drag and drop one to the header section
- File is opened
  • Loading branch information
NejcZdovc authored and bsclifton committed Jan 26, 2017
1 parent a89a550 commit b459adf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/components/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ class Tabs extends ImmutableComponent {
return
}
if (e.dataTransfer.files) {
Array.from(e.dataTransfer.files).forEach((file) =>
windowActions.newFrame({location: file.path, title: file.name}))
Array.from(e.dataTransfer.files).forEach((file) => {
const path = encodeURI(file.path)
return windowActions.newFrame({location: path, title: file.name})
})
}
}

Expand Down

0 comments on commit b459adf

Please sign in to comment.