Skip to content

Commit

Permalink
Fixed drog and drop for local files
Browse files Browse the repository at this point in the history
Resolves brave#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 committed Dec 23, 2016
1 parent 3004b9e commit 3da2d9f
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 3da2d9f

Please sign in to comment.