[Editor] Selected item sometimes may make it jump straight to the top/bottom of the list.
Moving the selected item from the Editor hierarchy makes it jump straight to the bottom. If you select another item, it fixes itself. Tested with device emulation both on and off:
https://github.com/Mitcheljager/workshop.codes/assets/6181929/a00caa67-3888-4a41-a94a-88e65df70851
I have a feeling it is a bug with sortablejs though 🤔
From: https://github.com/Mitcheljager/workshop.codes/pull/431#discussion_r1520804659
when you begin dragging it, it will default to the bottom. but if you drag it to the top it will want to be placed at the top, and towards the bottom it goes to the bottom. could it even be a setting in sortablejs? like making selected items stick to the top/bottom, or to sort selected objects only against other selected objects
I can't reproduce that myself in Firefox. It's not a SortableJS option, that's for sure. It looks like a mismatch between the sortable state and the Svelte store.
i can only reproduce on my phone, or by using device emulation in the inspector