Browse Source

Merge pull request #182 from roelvanduijnhoven/patch-1

Sort event does not always fire
pull/191/head
Lebedev Konstantin 10 years ago
parent
commit
91a15696bd
  1. 2
      Sortable.js

2
Sortable.js

@ -601,7 +601,7 @@
_disableDraggable(dragEl);
_toggleClass(dragEl, this.options.ghostClass, false);
if (!rootEl.contains(dragEl)) {
if (rootEl !== dragEl.parentNode) {
// drag from one list and drop into another
_dispatchEvent(dragEl.parentNode, 'sort', dragEl, rootEl, startIndex, newIndex);
_dispatchEvent(rootEl, 'sort', dragEl, rootEl, startIndex, newIndex);

Loading…
Cancel
Save