Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Multidrag plugin can receive event with null elements and crash #2357

Open
sadovsf opened this issue Mar 7, 2024 · 0 comments
Open

Comments

@sadovsf
Copy link

sadovsf commented Mar 7, 2024

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".
obrazek

Here place where multidrag causes crash:
Snímek obrazovky 2024-03-07 v 9 18 31

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant