-
Notifications
You must be signed in to change notification settings - Fork 468
Open
Description
@testing-library/dom
version: latest- Testing Framework and version:
- DOM Environment:
Relevant code or config:
dom-testing-library/src/events.js
Line 74 in accb6cc
value: Object.getOwnPropertyNames(dataTransferValue).reduce( |
new window.DataTransfer()
- adding data to it and passing it in, then this won't read the properties off it.
Try it for yourself - in Chrome Object.getOwnPropertyNames(new window.DataTransfer())
returns an empty array.
This means - it's impossible to use a DataTransfer object, add data to it and then use it for the event.
Suggested solution:
if the dataTransfer value passed to the event is an actual instance of window.DataTransfer
then just pass it on - don't try to copy properties over to a new instance
Metadata
Metadata
Assignees
Labels
No labels