Skip to content

Commit a60ded8

Browse files
committed
#1634: Fix onSpill plugins on mobile
1 parent f75c972 commit a60ded8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/OnSpill/OnSpill.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ const drop = function({
1212
}) {
1313
let toSortable = putSortable || activeSortable;
1414
hideGhostForTarget();
15-
let target = document.elementFromPoint(originalEvent.clientX, originalEvent.clientY);
15+
let touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
16+
let target = document.elementFromPoint(touch.clientX, touch.clientY);
1617
unhideGhostForTarget();
17-
1818
if (toSortable && !toSortable.el.contains(target)) {
1919
dispatchSortableEvent('spill');
2020
this.onSpill({ dragEl, putSortable });

0 commit comments

Comments
 (0)