bevacqua / dragula

:ok_hand: Drag and drop so simple it hurts
https://bevacqua.github.io/dragula/
MIT License
21.89k stars 1.97k forks source link

Fix drag-n-drop bug in chrome #552

Open sterrymdstaff opened 6 years ago

sterrymdstaff commented 6 years ago

In chrome, doc.elementFromPoint(x, y); throws an error when getElementBehindPoint(point, x, y) is called from release ( release({}) ).

While this seems to work in previous versions of chrome, it broke my application.

I found that simply calling release({clientX: -1, clientY: -1}) works without errors.

I updated the destroy() method with release({clientX: -1, clientY: -1}) instead of release({})