On fast drops the drop event fires before placeholder is created and component breaks
I'm opening this issue because when using this component if the user drags and drops fast enough the component breaks with errors that I am not sure how to recover from
supporting information:
- I use https://lukasoppermann.github.io/html5sortable/index.html
How can the issue be reproduce the problem?
Just drag as fast as you can many elements from a list to another list like in the picture. Usually after 10 tries you should be able to break it. Real users reported this, probably on slower computers it happens even more, no need to stress the app.
Thank you for reporting, do you already have a guess as to how this can be fixed?
No, sorry, I just temporary patched it by checking if the placeholder exists, and if not I return and delete any clone (display none) from the source list . The user perceives this as 'did not worked' but at least can try again and the app does not break. It's a bit strange for me the '_debounce' code, that seem to allow drop before rendering the placeholder. But have not dug deep enough into the code to fully understand it in order to mess with that .
Hey @ebreaur,
as I am not using this plugin myself anymore (and also not working as a developer) I am not really in the position to dedicate time to solve this issue. However if you would like to fix it I am happy to support you as good as I can.
Did you try disabling the _debounce to see if this is the issue?