Browse Source

#1036: fixed handle + filter

revertClone
Lebedev Konstantin 8 years ago
parent
commit
1a84714536
  1. 9
      Sortable.js

9
Sortable.js

@ -308,7 +308,7 @@
var _this = this, var _this = this,
el = this.el, el = this.el,
options = this.options, options = this.options,
preventOnFilter = preventOnFilter.options, preventOnFilter = options.preventOnFilter,
type = evt.type, type = evt.type,
touch = evt.touches && evt.touches[0], touch = evt.touches && evt.touches[0],
target = (touch || evt).target, target = (touch || evt).target,
@ -325,9 +325,6 @@
return; // only left button or enabled return; // only left button or enabled
} }
if (options.handle && !_closest(originalTarget, options.handle, el)) {
return;
}
target = _closest(target, options.draggable, el); target = _closest(target, options.draggable, el);
@ -367,6 +364,10 @@
} }
} }
if (options.handle && !_closest(originalTarget, options.handle, el)) {
return;
}
// Prepare `dragstart` // Prepare `dragstart`
this._prepareDragStart(evt, touch, target, startIndex); this._prepareDragStart(evt, touch, target, startIndex);
}, },

Loading…
Cancel
Save