We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d861f8 commit 87e336aCopy full SHA for 87e336a
Sortable.js
@@ -275,12 +275,12 @@
275
return; // only left button or enabled
276
}
277
278
- if (options.handle) {
279
- target = _closest(target, options.handle, el);
280
- }
281
-
282
target = _closest(target, options.draggable, el);
283
+ if (!target) {
+ return;
+ }
+
284
// get the index of the dragged element within its parent
285
oldIndex = _index(target);
286
@@ -308,6 +308,12 @@
308
309
310
311
312
+ if (options.handle && !_closest(originalTarget, options.handle, el)) {
313
314
315
316
317
// Prepare `dragstart`
318
if (target && !dragEl && (target.parentNode === el)) {
319
tapEvt = evt;
0 commit comments