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) { if (Sortable.active) {
// Only if we really move the item. if (newIndex == null || newIndex === -1) {
newIndex = oldIndex;
}
_dispatchEvent(this, rootEl, 'end', dragEl, rootEl, oldIndex, newIndex); _dispatchEvent(this, rootEl, 'end', dragEl, rootEl, oldIndex, newIndex);
// Save sorting // Save sorting

Loading…
Cancel
Save