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

(Drag and drop) get full path from custom data in dataTransfer.items from https://git… #9700

Merged
merged 1 commit into from
Jun 27, 2017

Conversation

bridiver
Copy link
Collaborator

@bridiver bridiver commented Jun 25, 2017

…hub.com/brave/muon/pull/228

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.

Fixes #9699

Test Plan:

Reviewer Checklist:

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

@bridiver bridiver self-assigned this Jun 25, 2017
@bridiver bridiver requested review from bbondy and NejcZdovc June 25, 2017 02:46
@@ -86,8 +86,9 @@ class BookmarksToolbar extends ImmutableComponent {
}
}
if (e.dataTransfer.files.length > 0) {
Copy link
Contributor

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

Copy link
Collaborator Author

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

Copy link
Contributor

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?

Copy link
Collaborator Author

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

Copy link
Collaborator Author

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

Copy link
Contributor

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) {
Copy link
Contributor

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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@NejcZdovc NejcZdovc added this to the 0.18.x (Developer Channel) milestone Jun 27, 2017
@bsclifton bsclifton changed the title get full path from custom data in dataTransfer.items from https://git… (Drag and drop) get full path from custom data in dataTransfer.items from https://git… Jun 27, 2017
@bsclifton bsclifton merged commit 74d4ea1 into master Jun 27, 2017
@bsclifton bsclifton deleted the issue-9699 branch June 27, 2017 17:41
bsclifton added a commit that referenced this pull request Jun 27, 2017
(Drag and drop) get full path from custom data in dataTransfer.items from https://git…
@bsclifton bsclifton modified the milestones: 0.17.x (Beta Channel), 0.18.x (Developer Channel) Jun 28, 2017
@bsclifton
Copy link
Member

pulling into 0.17.x since we need a new Muon 4.1.x version RE: extensions

bsclifton added a commit that referenced this pull request Jun 28, 2017
(Drag and drop) get full path from custom data in dataTransfer.items from https://git…
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants