Vue.Draggable: Nested dragging may cause unexpected DOM change

Our app has two-level nested draggable items and has list defined/mapped.

When dragging an item in the inner list, sometimes the DOM may update incorrectly, and when it happens, the item being dragged will jump to the beginning of the list. The vue data, however, is correct/as expected. So it seems like the DOM is updated inconsistently w.r.t. the event, whereas the vue data is fine.

We tried to make a reproducible demo: https://jsfiddle.net/6sha4vv6/1/

Dragging Wildcard Courses x to the place of Multiple Courses x and release can cause the former to jump to the first position.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 5
  • Comments: 20 (9 by maintainers)

Most upvoted comments

I just published vue,.draggable 2.5.0-rc-0 referencing Sortbale 1.5.0-rc1 which contains a fix for this issue,

Hello @kisglaci , to solve this, vue,draggable should update to use Sortable 1.5.0-rc2. Current version is not using this release. Temporary by-pass is to use Vue.Draggble v2.4.0 with Sortable 1.5.0-rc2 (changing the depeendy by hand)

Hello @jefflam , I will be nice to open a new issue for tracability reason. To undestand better your scenario, could you exlain why you are needing to tack dom changes vs viewmodel changes?