SortableJS / Vue.Draggable

Vue drag-and-drop component based on Sortable.js
https://sortablejs.github.io/Vue.Draggable/
MIT License
20.1k stars 2.9k forks source link

Incorrect clones/errors on real-time app while several drags happen at the same time #1087

Open Kasheftin opened 3 years ago

Kasheftin commented 3 years ago

The application can be used by several users at the same time. It uses sockets, etc. The issue happens when some user is being dragged an item, and the other user drags the same (or sometimes even the different one) item. This case the vuex state is being updated, value prop for draggable updated as well. Then the first user starts getting errors, clones, and the DOM structure desyncronizes from the vue.

I put it here because it seems to be Vue.Draggable error, not SortableJS. Here're 2 examples:

  1. https://jsfiddle.net/kasheftin/wdfvxyk1/ - pure SortableJS works correctly (no errors, no dom node clones): Peek 2021-10-14 12-41

  2. https://jsfiddle.net/kasheftin/60joz8wn/ - Vue.Draggable gives errors: Peek 2021-10-14 12-44

YoungCodeBro commented 1 year ago

How did you solve it