Skip to content

Commit a09bddb

Browse files
committed
#1556: Fix delayOnTouchOnly for android
1 parent e1d3de8 commit a09bddb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Sortable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
457457
options = this.options,
458458
preventOnFilter = options.preventOnFilter,
459459
type = evt.type,
460-
touch = evt.touches && evt.touches[0],
460+
touch = (evt.touches && evt.touches[0]) || (evt.pointerType && evt.pointerType === 'touch' && evt),
461461
target = (touch || evt).target,
462462
originalTarget = evt.target.shadowRoot && ((evt.path && evt.path[0]) || (evt.composedPath && evt.composedPath()[0])) || target,
463463
filter = options.filter;
@@ -1888,7 +1888,7 @@ Sortable.mount = function(...plugins) {
18881888

18891889
plugins.forEach((plugin) => {
18901890
if (!plugin.prototype || !plugin.prototype.constructor) {
1891-
throw `Sortable: Mounted plugin must be a constructor function, not ${ {}.toString.call(el) }`;
1891+
throw `Sortable: Mounted plugin must be a constructor function, not ${ {}.toString.call(plugin) }`;
18921892
}
18931893
if (plugin.utils) Sortable.utils = { ...Sortable.utils, ...plugin.utils };
18941894

0 commit comments

Comments
 (0)