Skip to content

Commit

Permalink
#1029: + lastDownEl
Browse files Browse the repository at this point in the history
  • Loading branch information
RubaXa committed Feb 15, 2017
1 parent 1aa0121 commit a7cddbc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
cloneEl,
rootEl,
nextEl,
lastDownEl,

scrollEl,
scrollParentEl,
Expand Down Expand Up @@ -334,6 +335,11 @@
return;
}

if (lastDownEl === target) {
// Ignoring duplicate `down`
return;
}

// Get the index of the dragged element within its parent
startIndex = _index(target, options.draggable);

Expand Down Expand Up @@ -379,6 +385,7 @@
dragEl = target;
parentEl = dragEl.parentNode;
nextEl = dragEl.nextSibling;
lastDownEl = target
activeGroup = options.group;
oldIndex = startIndex;

Expand Down Expand Up @@ -926,6 +933,7 @@
ghostEl =
nextEl =
cloneEl =
lastDownEl =

scrollEl =
scrollParentEl =
Expand Down

0 comments on commit a7cddbc

Please sign in to comment.