Skip to content

Commit

Permalink
#1634: Fix onSpill plugins on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-m1 committed Sep 15, 2019
1 parent f75c972 commit a60ded8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/OnSpill/OnSpill.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ const drop = function({
}) {
let toSortable = putSortable || activeSortable;
hideGhostForTarget();
let target = document.elementFromPoint(originalEvent.clientX, originalEvent.clientY);
let touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
let target = document.elementFromPoint(touch.clientX, touch.clientY);
unhideGhostForTarget();

if (toSortable && !toSortable.el.contains(target)) {
dispatchSortableEvent('spill');
this.onSpill({ dragEl, putSortable });
Expand Down

0 comments on commit a60ded8

Please sign in to comment.