The touchmove
event is fired when one or more touch points are moved along the touch surface.
TouchEvent
Document
or Element
Property | Type | Description |
---|---|---|
target Read only
| EventTarget | The event target (the topmost target in the DOM tree). |
type Read only
| DOMString | The type of event. |
bubbles Read only
| Boolean | Whether the event normally bubbles or not. |
cancelable Read only
| Boolean | Whether the event is cancelable or not. |
view Read only
| WindowProxy |
Document.defaultView , or the window the document resides in. |
detail Read only
| long (float) | Not used for touchmove events, so this value is always 0. |
touches Read only
| TouchList | A list of Touch es for every point of contact currently touching the surface. |
targetTouches Read only
| TouchList | A list of Touch es for every point of contact that is touching the surface and started on the element that is the target of the current event. |
changedTouches Read only
| TouchList | A list of Touch es, one for each point of contact which moved since the last touch event. |
ctrlKey Read only
| Boolean |
true if the control key was down when the event was fired. false otherwise. |
shiftKey Read only
| Boolean |
true if the shift key was down when the event was fired. false otherwise. |
altKey Read only
| Boolean |
true if the alt key was down when the event was fired. false otherwise. |
metaKey Read only
| Boolean |
true if the meta key was down when the event was fired. false otherwise. |
Code samples for those events are available on the dedicated page: Touch events.
We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | 22.0 | (Yes) |
18.0 (18.0)[1] 52.0 (52.0)[2] | No support | No support | No support |
Passive mode enabled by default | 56[3] | No support | 61 (61)[3] | No support | No support | No support |
Feature | Android | Android Webview | Chrome for Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | (Yes) | (Yes) | 6.0 (6.0) | 11 | (Yes) | (Yes) |
Passive mode enabled by default | ? | ? | 56[3] | No support | 56.0 (56)[3] | No support | No support | No support |
[1] Touch events were implemented in Firefox 18, but removed again in Firefox 24 on the the desktop version of Firefox due to web compatibility issues (bug 888304).
[2] As of Firefox 52, touch events support has been fixed and reenabled in Windows desktop platforms.
[3] In order to prevent event handlers for touchmove
events from blocking rendering during the scrolling of the document or window, Chrome and Firefox have changed the default for the passive
option for addEventListener()
on these events to true
.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/Events/touchmove