From 1a8471453614e2559d107c9a2d2a346c906cc5eb Mon Sep 17 00:00:00 2001 From: Lebedev Konstantin Date: Thu, 16 Feb 2017 09:29:57 +0300 Subject: [PATCH] #1036: fixed handle + filter --- Sortable.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Sortable.js b/Sortable.js index a1f6fde..0acdb32 100644 --- a/Sortable.js +++ b/Sortable.js @@ -308,7 +308,7 @@ var _this = this, el = this.el, options = this.options, - preventOnFilter = preventOnFilter.options, + preventOnFilter = options.preventOnFilter, type = evt.type, touch = evt.touches && evt.touches[0], target = (touch || evt).target, @@ -325,9 +325,6 @@ return; // only left button or enabled } - if (options.handle && !_closest(originalTarget, options.handle, el)) { - return; - } target = _closest(target, options.draggable, el); @@ -367,6 +364,10 @@ } } + if (options.handle && !_closest(originalTarget, options.handle, el)) { + return; + } + // Prepare `dragstart` this._prepareDragStart(evt, touch, target, startIndex); },