-
Notifications
You must be signed in to change notification settings - Fork 969
(Drag and drop) get full path from custom data in dataTransfer.items from https://git… #9700
Conversation
@@ -86,8 +86,9 @@ class BookmarksToolbar extends ImmutableComponent { | |||
} | |||
} | |||
if (e.dataTransfer.files.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we should probably change from e.dataTransfer.files.length
into e.dataTransfer.items.length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, we specifically don't want to do that because we only want these items when there are files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so we didn't replace files object with items, but we only added items into dataTransfer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
files only contains the filename, not the full path. We added the full path for files into items when files are present
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are limitations on what we can do with this api without breaking compatibility so rather than change what is contained in file, we added the extra data to items
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sense, then we don't need to change this line 😃
@@ -115,9 +115,10 @@ class Navigator extends React.Component { | |||
|
|||
onDrop (e) { | |||
if (e.dataTransfer.files.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@@ -98,9 +98,10 @@ class Tabs extends React.Component { | |||
} | |||
|
|||
if (e.dataTransfer.files) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
(Drag and drop) get full path from custom data in dataTransfer.items from https://git…
pulling into 0.17.x since we need a new Muon 4.1.x version RE: extensions |
(Drag and drop) get full path from custom data in dataTransfer.items from https://git…
…hub.com/brave/muon/pull/228
Submitter Checklist:
git rebase -i
to squash commits (if needed).Fixes #9699
Test Plan:
Reviewer Checklist:
Tests