Pointer drag and drop issue with expanded item
See original GitHub issueIn my interface, I have an expansion panel component that can be expanded/collapsed that I am now using svelte-dnd-action to reorder.
If the panel not expanded, dnd works great, but as soon as I try to drag a panel that is open, it disappears (either immediate when dragging, or after being dropped):
https://user-images.githubusercontent.com/177476/107232425-62c35200-69ef-11eb-9719-b93c4c5e7056.mp4
If I keep trying to drag a few, at some point this error shows up in the console as well:

What’s surprising is keyboard interaction works as expected with an expanded item:
https://user-images.githubusercontent.com/177476/107232701-b635a000-69ef-11eb-8d21-cf504adeb172.mp4
I tried to create minimal reproduction of the issue but I haven’t been able to just yet (I’ll keep trying), although there is one oddity in the current example: If the item is “expanded” and you drag it, it resizes back to “collapsed”, although it doesn’t disappear like in my case. It appears the internal state of the component is lost/reset when it is dnd but not with keyboard interactions.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (6 by maintainers)

Top Related StackOverflow Question
Good luck! This library seems to use the native drag and drop api which i was actively trying to avoid 😃 I think your internal state will still not persist if svelte re renders the component for any reason. Let me know if i can be of further assistance.
On Wed, Feb 10, 2021, 07:12 Sean Lynch notifications@github.com wrote:
Keyboard ‘dragging’ has no intermediary states and no shadow items. It is much simpler.
On Tue, Feb 9, 2021, 06:43 Sean Lynch notifications@github.com wrote: