react-dnd / react-dnd-html5-backend

HTML5 backend for React DnD [Legacy Repo]
MIT License
146 stars 97 forks source link

Dropping "NativeTypes.FILE" stopped working in Chrome 47 #14

Closed danielberndt closed 8 years ago

danielberndt commented 8 years ago

I've prepared a minimal example here: https://github.com/danielberndt/react-starter/tree/react-dnd-test

When dropping an image, it should be calling the drop method but instead the file gets opened in the browser. No warning or error gets issued.

This fails on Chrome 47 on Mac 10.9.5. It works fine on Firefox and used to work fine on earlier versions of Chrome on my machine.

danielberndt commented 8 years ago

I did some digging in the code, and it turns out that the mousemove event registered here fires too early on Chrome. This is why a DRAG_END is fired before the drop handler is called, causing the issue.

danielberndt commented 8 years ago

Okay, I've just have seen #4. It's fix is probably the cause for this issue here.

EvHaus commented 8 years ago

I can confirm. Chrome 47 doesn't seem to be responding to file drop events (even hover). Works fine in Firefox though though.

danielberndt commented 8 years ago

current workaround is to use the 2.0.0 version.

gaearon commented 8 years ago

Is this still an issue with Chrome 48?

gaearon commented 8 years ago

This should be fixed in react-dnd-html5-backend@2.1.2.