taye / interact.js

JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers (and also IE9+)

Home Page:http://interactjs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect dropzone after scrolling

davek1979 opened this issue · comments

To simplify the issue, I'm only talking about horizontal scrolling.
In a long horizontal list of dropzones in a scrollable container, dragging doesn't target correct dropzone if horizontal scrolling occurs.
This is without using the autoScroll feature.
Dropzone overlap is set to "pointer".
Scrolling is set to happen after getting cursor within some distance from each side.

Expected behavior

All the way throughout dragging and possible scrolling of the parent container, target dropzone should be correctly identified under mouse cursor.

Actual behavior

When dragging horizontally to the right, after scrolling past a few dropzones, instead of targeting the dropzone underneath the cursor Interact.js actually targets the last dropzone visible in the container before scrolling.
I believe this is because the internal pointer data ignores scrollLeft and scrollTop of the parent container - hence not targeting the correct dropzone.

System configuration

interact.js version: '1.10.11'
Browser name and version: Chrome 95.0.4638.69
Operating System: Windows 10

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

commented

Calling interact.dynamicDrop(true) should fix this.

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.