Skip to content

Commit

Permalink
Merge pull request #1784 from RomualdoGrillo/master
Browse files Browse the repository at this point in the history
Solves "insert Before error" issue on nested lists
  • Loading branch information
owen-m1 authored Apr 14, 2020
2 parents 5a8603d + c724964 commit e02baa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1692,7 +1692,7 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
if (Sortable.eventCanceled) return;

// show clone at dragEl or original position
if (rootEl.contains(dragEl) && !this.options.group.revertClone) {
if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
rootEl.insertBefore(cloneEl, dragEl);
} else if (nextEl) {
rootEl.insertBefore(cloneEl, nextEl);
Expand Down

0 comments on commit e02baa8

Please sign in to comment.