react-dnd / react-dnd-html5-backend

HTML5 backend for React DnD [Legacy Repo]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Drop doesn't work in chromium webview elements

aeneasr opened this issue · comments

Due to chromium bug 412373 this backend isn't workin in chromium webview elements.

I've read that setting dataTransfer.setData('text', /* .. */); helps, similar to the firefox workaround dataTransfer.setData('application/json', {});.

I went ahead an added dataTransfer.setData('text', 'asdf'); a line before the firefox hack. Now, dropping is at least trinngering the callback, but I'm stuck with this error: Uncaught Invariant Violation: Cannot call hover while not dragging. caused by this line.

The code is working fine in a regular browser. Ideas and help greatly appreciated. Chromium bug is fixed but it will take a while before it's released and linked in dependencies like electron.

This was resolved upstream

@arekkas upstream: in Chromium? 56 or 57? For instance, in electron v1.6.1 beta (Chrome 56) works for you?

I didn't upgrade anything actually, but it was a deep dependency which got updated and that is referenced in another dependency with *. Removing your npm modules and installing them again might already do the trick.

package.json:

"electron": "^1.4.15",