Browse Source

Merge pull request #624 from cauburtin/patch-2

avoid changing oldIndex by the parent container
pull/634/merge
Lebedev Konstantin 9 years ago
parent
commit
0dd6b94f23
  1. 10
      Sortable.js

10
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);
},

Loading…
Cancel
Save