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.76k stars 3.7k forks source link

This library breaks when using `container-type: inline-size;` #2377

Open srcrip opened 6 months ago

srcrip commented 6 months ago

I know the maintenance of this lib is slightly up in the air, but this has caused me a ton of problems trying to figure this out, so here's the info in case this bites anyone else.

The calculation around dragging the element based on cursor position gets totally broken if you happen to use this inside an element with container-type: inline-size;. No idea why. If someone knows and thinks they could fix it that would be pretty cool. Otherwise, you need to avoid using this with container queries I guess.

This also effects the sortablejs library. I'm not really sure why.