[bug] Multidrag plugin can receive event with null elements and crash
sadovsf opened this issue · 0 comments
Describe the bug
When you have Multidrag plugin enabled in Vue environment and you drag out of browser window and then back. Eventually (i was usually hovering back over page few more seconds) when you drop. Plugin receives event with all elements being null and crashes on access to parentEl.children
inside drop handler.
Here you can see _onDrop of sortable lib which is already "empty".
Here place where multidrag causes crash:
Expected behavior
I believe plugin should check for this case and handle it properly.
Information
Versions - Look in your package.json
for this information:
sortablejs = ^1.15.2
@types/sortablejs = ^1.15.8
Additional context
Whole sortable is run inside Vue but not using VueDraggable wrapper. Just simple plain lib usage. But it is possible that original HTML elements get updated or somehow changed. They maybe even replaced (user does not see anything like that but Vue may do some refreshes under the hood). Also note iam not able to reproduce it in codesandbox so it seems that Vue may be the key for reproducing this and even there i cannot reproduce it 100% cases so Vue updates may really be involved