Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions plugins/MultiDrag/MultiDrag.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,10 @@ function MultiDragPlugin() {

// Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted
// while folding, and so that we can capture them again because old sortable will no longer be fromSortable
parentEl.appendChild(multiDragElement);
if (!multiDragElement.contains(parentEl)) {
// multiDragElement can't contains parentEl
parentEl.appendChild(multiDragElement);
}
});

folding = true;
Expand Down Expand Up @@ -423,7 +426,10 @@ function MultiDragPlugin() {
if (children[multiDragIndex]) {
parentEl.insertBefore(multiDragElement, children[multiDragIndex]);
} else {
parentEl.appendChild(multiDragElement);
if (!multiDragElement.contains(parentEl)) {
// multiDragElement can't contains parentEl
parentEl.appendChild(multiDragElement);
}
}
multiDragIndex++;
});
Expand Down