SortableJS / Vue.Draggable

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

fix: filter out comment node to prevent sorting issue with collapsibl… #1223

Open Belinda-advmeds opened 1 year ago

Belinda-advmeds commented 1 year ago

Issue When a table has collapsible items, or the table row has dynamic items depending on vue directive v-if/v-show, the dragging behavior is wired and the sorting order is wrong.

Root Cause In addition to the actual rows, the rows with v-if directive false will be comment nodes which causes the dragging target is wrong.

Solution Filter out comment nodes to avoid the bug