Browse Source

Don't swap when dropping onto the same element

pull/1361/head
Ken Cation 6 years ago
parent
commit
9615453740
  1. 5
      Sortable.js
  2. 2
      Sortable.min.js

5
Sortable.js

@ -1040,7 +1040,10 @@
if (options.swap && lastEl) if (options.swap && lastEl)
{ {
_dispatchEvent(this, rootEl, 'end', dragEl, parentEl, rootEl, oldIndex, newIndex, evt, {swapItem:lastEl}); if (dragEl !== lastEl)
{
_dispatchEvent(this, rootEl, 'end', dragEl, parentEl, rootEl, oldIndex, newIndex, evt, {swapItem:lastEl});
}
} }
else else
{ {

2
Sortable.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save