-
Notifications
You must be signed in to change notification settings - Fork 149
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
Drag freezes when originally dragged element is removed from DOM #143
Comments
Hi and sorry for the long delay. Can you provide me a git repo or stackblitz/plunkr which reproduces the problem so I can take a look and play with it? |
Hey @reppners I've created a simple demo where you can reproduce this issue. Steps to reproduce:
Expected behaviour : The elements are updated and the drag and drop can be used again. You can see the codebase here: https://stackblitz.com/edit/angular-jxj2v4 Would be great and helpful for the community if this one gets some solution. At all , when the view/data is being updated while dragging some element the element itself freezes and the drag in drop is being disabled. |
Thanks for providing a reproduction, I'll try to track down the root cause. |
I'm a bit uncertain on how to workaround this if even possible. See
Edit: Chrome and Firefox show the same behaviour in mobile emulation mode. |
Hey @reppners I found a workaround which fits my case. Instead of updating the existing elements (destroying the element that is being dragged), I've created 2 components with the same elements (second components is with the updated data elements which the dragged element from component 1 can be dropped onto them) and just toggling the visibility with |
Closing as non-actionable on the library level but workarounds can be made at application level 👍 |
I observe this in iOS safari, as every other browser I support has native Drag & Drop.
This is how this works in desktop and chrome for android.
In safari I can use drag and drop to sort within the same list (drop-area) but if fails if I trans to drag from one area to another one.
If I inspect the logs, when the drag freezes I can see in the console some messages looping for ever. They don't stop, no matter what I do or where I click:
The text was updated successfully, but these errors were encountered: