diff --git a/Sortable.js b/Sortable.js index 3faf0a06f..caa55e105 100644 --- a/Sortable.js +++ b/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