Browse Source

Merge pull request #1043 from elonmallin/patch-2

fix: make drag on touch work in scrollable element
touch-action
Lebedev Konstantin 8 years ago committed by GitHub
parent
commit
97e9054c48
  1. 13
      Sortable.js

13
Sortable.js

@ -26,6 +26,16 @@
}; };
} }
var supportsPassive = false;
try {
var opts = Object.defineProperty({}, 'passive', {
get: function() {
supportsPassive = true;
}
});
window.addEventListener("test", null, opts);
} catch (e) {}
var dragEl, var dragEl,
parentEl, parentEl,
ghostEl, ghostEl,
@ -67,7 +77,7 @@
$ = win.jQuery || win.Zepto, $ = win.jQuery || win.Zepto,
Polymer = win.Polymer, Polymer = win.Polymer,
captureMode = false, captureMode = supportsPassive ? {capture: false, passive: false} : false,
supportDraggable = !!('draggable' in document.createElement('div')), supportDraggable = !!('draggable' in document.createElement('div')),
supportCssPointerEvents = (function (el) { supportCssPointerEvents = (function (el) {
@ -230,7 +240,6 @@
// Export instance // Export instance
el[expando] = this; el[expando] = this;
el.style['touch-action'] = 'none'; // #1022
// Default options // Default options
var defaults = { var defaults = {

Loading…
Cancel
Save