taye / interact.js

JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers (and also IE9+)
http://interactjs.io/
MIT License
12.38k stars 785 forks source link

ondrop event does not return the right target when dropzone is inside a scrollable container with autoScroll. #199

Closed Nic128 closed 9 years ago

Nic128 commented 9 years ago

Codepen to reproduce: http://codepen.io/Nic128/pen/bdWjXV

A drag element does not detect the right dropzone target if autoScroll is set inside a container with an overflow scroll.

In this codepen, you can see the drag element inside the drop zone does not follow the mouse when using the autoScroll, fixed it by calculating scroll position, but it does not fix the fact that the other dropzones are not detected properly.

emildimitrov commented 9 years ago

Same issue here. I think Its because when scrolling dragmove is not fired. I tried the fix from this issue https://github.com/taye/interact.js/issues/38 but without results

Nic128 commented 9 years ago

After establishing a connection to drag move problems. I reread the docs. http://interactjs.io/docs/faq/#changing-dropzones-while-dragging

I added this.

interact.dynamicDrop(true);

It fixed the dropzone target issue.