Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DropZone: Avoid calling callbacks if file dropped on another dropzone #5432

Merged
merged 1 commit into from
Mar 9, 2018

Conversation

youknowriad
Copy link
Contributor

@youknowriad youknowriad commented Mar 6, 2018

closes #3393 and closes #3392

The Media Modal contains a dropzone and if we try to drop a file there, it will be uploaded twice and maybe inserter into the editor canvas because the editor is full of dropzones under the modal.

This PR updates the dropzones behavior to only trigger the callbacks if the hovered dropzone is the dropzone being dropped into.

Testing instructions

  • In a post full of content
  • Try assigning a featured image by drag and dropping an image to the media modal
  • The image should upload once and should not be inserted to the post content.

@youknowriad youknowriad self-assigned this Mar 6, 2018
@youknowriad youknowriad added the [Type] Bug An existing feature does not function as intended label Mar 6, 2018
@youknowriad youknowriad requested a review from a team March 6, 2018 15:42
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

It works as advertised 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uploading Featured Image inserts it into post content Uploading a Featured image uploads it twice
2 participants