Skip to content

Commit

Permalink
#277: * fixed handle & filter
Browse files Browse the repository at this point in the history
  • Loading branch information
RubaXa committed Feb 20, 2015
1 parent 2d861f8 commit 87e336a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@
return; // only left button or enabled
}

if (options.handle) {
target = _closest(target, options.handle, el);
}

target = _closest(target, options.draggable, el);

if (!target) {
return;
}

// get the index of the dragged element within its parent
oldIndex = _index(target);

Expand Down Expand Up @@ -308,6 +308,12 @@
}
}


if (options.handle && !_closest(originalTarget, options.handle, el)) {
return;
}


// Prepare `dragstart`
if (target && !dragEl && (target.parentNode === el)) {
tapEvt = evt;
Expand Down

0 comments on commit 87e336a

Please sign in to comment.