6

I want to fire a event on a react element where i currently move my finger across. I tried onTouchMove but it fires only for the first element i touch and then keeps firing it. The only way i'm able to track the currently touched element down is the elementFromPoint() method.

handleTouchMove(e) {
    e.preventDefault();
    let changedTouch = event.changedTouches[0];
    let elem = document.elementFromPoint(changedTouch.clientX, changedTouch.clientY);
}

Now i have the element, but i'm working with the dom directly. Any ideas how to avoid this?

David Spiess
  • 600
  • 1
  • 11
  • 21

0 Answers0