From a09bddb7ef0af5f51a2f8aeb0a5ee557004acfb4 Mon Sep 17 00:00:00 2001 From: owen-m1 Date: Wed, 3 Jul 2019 19:02:47 -0400 Subject: [PATCH] #1556: Fix delayOnTouchOnly for android --- src/Sortable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Sortable.js b/src/Sortable.js index 306bd69..02d1aae 100644 --- a/src/Sortable.js +++ b/src/Sortable.js @@ -457,7 +457,7 @@ Sortable.prototype = /** @lends Sortable.prototype */ { options = this.options, preventOnFilter = options.preventOnFilter, type = evt.type, - touch = evt.touches && evt.touches[0], + touch = (evt.touches && evt.touches[0]) || (evt.pointerType && evt.pointerType === 'touch' && evt), target = (touch || evt).target, originalTarget = evt.target.shadowRoot && ((evt.path && evt.path[0]) || (evt.composedPath && evt.composedPath()[0])) || target, filter = options.filter; @@ -1888,7 +1888,7 @@ Sortable.mount = function(...plugins) { plugins.forEach((plugin) => { if (!plugin.prototype || !plugin.prototype.constructor) { - throw `Sortable: Mounted plugin must be a constructor function, not ${ {}.toString.call(el) }`; + throw `Sortable: Mounted plugin must be a constructor function, not ${ {}.toString.call(plugin) }`; } if (plugin.utils) Sortable.utils = { ...Sortable.utils, ...plugin.utils }; -- GitLab