The touchmove event fires when one or more touch points move along the surface. Learn TouchEvent, changedTouches, passive listeners, drag patterns, Pointer Events alternatives, and five try-it labs.
01
Kind
Instance event
02
Type
TouchEvent
03
When
Finger slides
04
Handler
ontouchmove
05
Bubbles?
Yes
06
Status
Limited availability
Fundamentals
Introduction
After touchstart, sliding a finger fires touchmove repeatedly. That is the signal for custom drag, swipe tracking, and ink-style drawing on touch devices.
Like other touch events, it can fire at a high rate. Keep handlers light, prefer { passive: true } when you do not call preventDefault(), and consider pointermove for mouse + pen + touch together.
💡
Beginner tip
Calling preventDefault() on touchmove can stop page scrolling. Only do that for intentional custom gestures, and pair with touch-action CSS when you can.
Concept
Understanding touchmove
An instance event that answers: “Did one or more fingers move on the surface?”
Trigger — touch points move along the surface.
Event type — TouchEvent; use changedTouches.
Bubbles — yes; cancelable when you need to block default gestures.
High rate — keep work cheap; throttle paint if needed.
Limited availability on MDN (not Baseline)—desktop Safari often lacks Touch Events.
Patterns follow MDN Element: touchmove event and the Touch events guide. Use a touch device or DevTools touch simulation; some labs include mouse fallbacks for desktop practice.
📚 Getting Started
Listen for slide and read coordinates.
Example 1 — Log touchmove Position
Print clientX / clientY while the finger slides.
JavaScript
const pad = document.getElementById("pad");
const out = document.getElementById("out");
pad.addEventListener("touchmove", (event) => {
const t = event.changedTouches[0];
if (!t) return;
out.textContent =
"x=" + Math.round(t.clientX) +
" y=" + Math.round(t.clientY);
}, { passive: true });
touchmove is marked Limited availability on MDN (not Baseline). Logos use the shared browser-image-sprite.png sprite from this project. Touch Events are strong on mobile; many desktop browsers omit them—prefer Pointer Events for cross-device UIs.
✓ Limited availability
Element touchmove
Fires while touch points move. Chrome 22+, Firefox 52+, Edge 12+, Safari iOS yes; desktop Safari often no.
PartialNot Baseline
Google Chrome22+ (touch-capable / mobile)
Supported
Mozilla Firefox52+ (desktop re-enabled)
Supported
Apple SafariiOS yes · desktop often no
Partial
Microsoft Edge12+
Supported
OperaMobile / Chromium touch paths
Partial
Internet ExplorerNot supported (use Pointer Events)
Unavailable
touchmoveLimited
Bottom line: Use passive touchmove for observation, touch-action for custom drag, and prefer pointermove for mouse + pen + touch together.
Wrap Up
Conclusion
touchmove is the continuous “finger sliding” signal in the Touch Events API. Read changedTouches, keep handlers light and usually passive, finish with touchend / touchcancel, and consider Pointer Events for cross-device UIs.
Use { passive: true } when you only read positions
Read move data from changedTouches
Keep drag math cheap; throttle heavy paint if needed
Pair with touchend and touchcancel
Prefer Pointer Events for new multi-input UIs
❌ Don’t
Call preventDefault() on every move unless you must
Do heavy layout thrashing inside the raw handler
Assume desktop Safari exposes Touch Events
Detect “mobile” only by checking for ontouchstart
Overwrite ontouchmove if you need multiple listeners
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about touchmove
Finger sliding—observe lightly, drag carefully, prefer pointers for new UIs.
5
Core concepts
📱01
On slide
points move
Trigger
📄02
TouchEvent
changedTouches
API
⚡03
Passive
prefer true
Perf
👆04
Drag
follow clientX/Y
Pattern
🎯05
Limited
prefer pointermove
Status
❓ Frequently Asked Questions
It fires when one or more touch points move along the touch surface—continuously while the finger slides.
No. MDN does not mark Element touchmove as Deprecated, Experimental, or Non-standard. It has Limited availability (not Baseline), mainly because desktop Safari and some desktop browsers omit or limit Touch Events.
A TouchEvent. Use changedTouches for the points that moved; also inspect touches and targetTouches as needed.
touchmove can fire at a high rate. A non-passive listener that calls preventDefault can block scrolling. Prefer { passive: true } unless you must prevent the browser’s default scroll/zoom.
touchmove is Touch Events only. pointermove works for mouse, pen, and touch. For new cross-device UIs, prefer Pointer Events.
The touch-action property can limit which gestures the browser handles (pan, zoom). It often pairs with custom drag code that listens for touchmove.
Did you know?
Browsers may treat document-level touchmove listeners as passive by default for scroll performance. If you need preventDefault(), register with { passive: false } explicitly and only on the element that needs it.