Element: touchmove event
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Thetouchmove event is fired when one or more touch points are moved along the touch surface.
In this article
Syntax
Use the event name in methods likeaddEventListener(), or set an event handler property.
addEventListener("touchmove", (event) => { })ontouchmove = (event) => { }Event type
ATouchEvent. Inherits fromEvent.
Event properties
This interface inherits properties from its parent,UIEvent andEvent.
TouchEvent.altKeyRead onlyA Boolean value indicating whether or not the alt key was down when the touch event was fired.
TouchEvent.changedTouchesRead onlyA
TouchListof all theTouchobjects representing individual points of contact whose states changed between the previous touch event and this one.TouchEvent.ctrlKeyRead onlyA Boolean value indicating whether or not the control key was down when the touch event was fired.
TouchEvent.metaKeyRead onlyA Boolean value indicating whether or not the meta key was down when the touch event was fired.
TouchEvent.shiftKeyRead onlyA Boolean value indicating whether or not the shift key was down when the touch event was fired.
TouchEvent.targetTouchesRead onlyA
TouchListof all theTouchobjects that are both currently in contact with the touch surfaceand were also started on the same element that is the target of the event.TouchEvent.touchesRead onlyA
TouchListof all theTouchobjects representing all current points of contact with the surface, regardless of target or changed status.TouchEvent.rotationNon-standardRead onlyChange in rotation (in degrees) since the event's beginning. Positive values indicate clockwise rotation; negative values indicate counterclockwise rotation. Initial value:
0.0.TouchEvent.scaleNon-standardRead onlyDistance between two digits since the event's beginning. Expressed as a floating-point multiple of the initial distance between the digits at the beginning of the event. Values below 1.0 indicate an inward pinch (zoom out). Values above 1.0 indicate an outward unpinch (zoom in). Initial value:
1.0.
Examples
Code samples for those events are available on the dedicated page:Touch events.
Specifications
| Specification |
|---|
| Touch Events> # event-touchmove> |
| Touch Events> # dom-globaleventhandlers-ontouchmove> |