SortableJS / Sortable

Reorderable drag-and-drop lists for modern browsers and touch devices. No jQuery or framework required.
https://sortablejs.github.io/Sortable/
MIT License
29.59k stars 3.7k forks source link

Marking other HTML elements as "non-drop targets"? #2129

Open ffxsam opened 2 years ago

ffxsam commented 2 years ago

First off, thanks for this awesome library!

I'm having an issue with autoscroll. Because I have a fixed toolbar at the top of my page, when a user drags a sortable item up to the top of the page, it won't scroll because (I assume) it thinks the user might want to drop the item on the toolbar.

Is there a way for me to mark HTML elements as non-drop targets, so SortableJS ignores these? The only hack I can think of (not ideal) is to detect when an item is dragging, and then globally set all fixed elements with pointer-events: none.

Timo534 commented 2 years ago

https://github.com/SortableJS/Sortable/issues/1582