Browse Source

#447: fixed newIndex if eq null or -1

pull/560/merge
RubaXa 9 years ago
parent
commit
7fd16cb0a5
  1. 7
      Sortable.js

7
Sortable.js

@ -791,8 +791,11 @@
}
}
if (newIndex >= 0) {
// Only if we really move the item.
if (Sortable.active) {
if (newIndex == null || newIndex === -1) {
newIndex = oldIndex;
}
_dispatchEvent(this, rootEl, 'end', dragEl, rootEl, oldIndex, newIndex);
// Save sorting

Loading…
Cancel
Save