workshop.codes icon indicating copy to clipboard operation
workshop.codes copied to clipboard

[Editor] Selected item sometimes may make it jump straight to the top/bottom of the list.

Open netux opened this issue 1 year ago • 3 comments

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

netux avatar Mar 12 '24 12:03 netux

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

Loottoo avatar Mar 12 '24 20:03 Loottoo

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.

Mitcheljager avatar Mar 12 '24 20:03 Mitcheljager

i can only reproduce on my phone, or by using device emulation in the inspector

Loottoo avatar Mar 12 '24 21:03 Loottoo