Skip to content

Commit 113944e

Browse files
committed
fix clone issue
1 parent 93b9912 commit 113944e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Sortable.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,9 +864,12 @@
864864

865865
dragRect = dragEl.getBoundingClientRect();
866866

867-
if (putSortable !== this) {
867+
if (putSortable !== this && this !== Sortable.active) {
868868
putSortable = this;
869869
isMovingBetweenSortable = true;
870+
} else if (this === Sortable.active) {
871+
isMovingBetweenSortable = false;
872+
putSortable = null;
870873
}
871874

872875
if (revert) {
@@ -1067,7 +1070,7 @@
10671070

10681071
ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
10691072

1070-
if (rootEl === parentEl || this.lastPutMode !== 'clone') {
1073+
if (rootEl === parentEl || (putSortable && putSortable.lastPutMode !== 'clone')) {
10711074
// Remove clone
10721075
cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
10731076
}

0 commit comments

Comments
 (0)