diff --git a/Sortable.js b/Sortable.js index 7078104..45bc769 100644 --- a/Sortable.js +++ b/Sortable.js @@ -269,6 +269,10 @@ if (!target) { return; } + + if (options.handle && !_closest(originalTarget, options.handle, el)) { + return; + } // get the index of the dragged element within its parent oldIndex = _index(target); @@ -297,12 +301,6 @@ } } - - if (options.handle && !_closest(originalTarget, options.handle, el)) { - return; - } - - // Prepare `dragstart` this._prepareDragStart(evt, touch, target); },