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

Fix dropzone issue in Edge - event.dataTransfer.types not being an array #10262

Merged
merged 1 commit into from Sep 30, 2018

Conversation

Projects
None yet
2 participants
@talldan
Contributor

talldan commented Sep 30, 2018

Description

Fixes #9729

In Edge event.dataTransfer.types is implemented as a DomStringList instead of
an array. See Edge bug report:
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/18164853/

Using Lodash includes ensures both arrays and DomStringList types are
supported.

How has this been tested?

  1. Loaded the gutenberg demo post (tested in both Edge and Chrome)
  2. Attempted to drag and drop blocks
  3. Observed that the drop zones are highighted when dragging a block into a different position.
  4. Observed that the block is moved to the new position when the mouse button is released

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
Fix dropzone issue in Edge - event.dataTransfer.types not being an array
In Edge event.dataTransfer.types is implemented as a DomStringList instead of
an array. See Edge bug report:
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/18164853/

Using Lodash includes ensures both arrays and DomStringList types are
supported.

@talldan talldan added this to the 4.0 milestone Sep 30, 2018

@talldan talldan self-assigned this Sep 30, 2018

@mcsf

mcsf approved these changes Sep 30, 2018

@talldan talldan merged commit e8ce032 into master Sep 30, 2018

2 checks passed

codecov/project 48.57% remains the same compared to 0fe7d08
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@talldan talldan deleted the fix/dropzones-in-edge branch Sep 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment