From 676134128d5203dd888b6e089f316107d02c9220 Mon Sep 17 00:00:00 2001 From: why520crazy Date: Tue, 10 Nov 2015 11:13:09 +0800 Subject: [PATCH] don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group. --- Sortable.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sortable.js b/Sortable.js index f4ac38d..dbbcc7c 100644 --- a/Sortable.js +++ b/Sortable.js @@ -258,8 +258,10 @@ target = (touch || evt).target, originalTarget = target, 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) { return; // only left button or enabled }