Skip to content

Figuring out touch

Ken edited this page Jun 24, 2023 · 1 revision

Events

  • touchstart
  • touchmove
  • touchend

TouchEvent.changedTouches

Touch events have a changedTouches property. For start, this is all new touches. For move it's all touches updated "since the last event" (only TouchEvents? dunno). For end it's all touches that ended.

Touch interface

Each Touch has a unique Touch.identifier that persists until touchend. Has coordinates for: screen, client, and page. Also has target, associated with the element the touch started on. Depending on hardware, also may have radius/rotation/force values.


References

Touch events walkthrough (MDN)
TouchEvent (MDN)

Clone this wiki locally