Skip to content

Fixed drag & drop bug in IE 11#82

Open
chrisribal wants to merge 1 commit intozdy1988:masterfrom
chrisribal:patch-1
Open

Fixed drag & drop bug in IE 11#82
chrisribal wants to merge 1 commit intozdy1988:masterfrom
chrisribal:patch-1

Conversation

@chrisribal
Copy link

@chrisribal chrisribal commented Nov 2, 2018

On drag start's dataTransfer store, the setData() function only accepts a DOMString as second arguments, according to https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setData

While modern browsers stringify the null data type to "null" string value, drag & drop functionality breaks in IE 11 when passing null to e.dataTranser.setData('text', null)

I simply fixed this by passing an empty string to the setData() function.

On drag start's dataTransfer store, the setData() function only accepts a string as second arguments, according to https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setData

While modern browsers stringify the null data type to "null" string value, drag & drop breaks in IE 11 when passing null to e.dataTranser.setData('text', null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant