Skip to content

Commit e02baa8

Browse files
authored
Merge pull request #1784 from RomualdoGrillo/master
Solves "insert Before error" issue on nested lists
2 parents 5a8603d + c724964 commit e02baa8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Sortable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1692,7 +1692,7 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
16921692
if (Sortable.eventCanceled) return;
16931693

16941694
// show clone at dragEl or original position
1695-
if (rootEl.contains(dragEl) && !this.options.group.revertClone) {
1695+
if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
16961696
rootEl.insertBefore(cloneEl, dragEl);
16971697
} else if (nextEl) {
16981698
rootEl.insertBefore(cloneEl, nextEl);

0 commit comments

Comments
 (0)