Browse Source

don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.

pull/689/head
why520crazy 9 years ago
parent
commit
676134128d
  1. 6
      Sortable.js

6
Sortable.js

@ -258,8 +258,10 @@
target = (touch || evt).target, target = (touch || evt).target,
originalTarget = target, originalTarget = target,
filter = options.filter; filter = options.filter;
// don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
if(dragEl){
return;
}
if (type === 'mousedown' && evt.button !== 0 || options.disabled) { if (type === 'mousedown' && evt.button !== 0 || options.disabled) {
return; // only left button or enabled return; // only left button or enabled
} }

Loading…
Cancel
Save