The touchend event fires when one or more touch points are removed from the surface. Learn TouchEvent, changedTouches, how it differs from touchcancel, tap patterns, Pointer Events alternatives, and five try-it labs.
01
Kind
Instance event
02
Type
TouchEvent
03
When
Finger lifts
04
Handler
ontouchend
05
Bubbles?
Yes
06
Status
Limited availability
Fundamentals
Introduction
touchend is the normal end of a touch: the user lifts one or more fingers. Use it to finish a drag, complete a tap, or clear “pressed” UI.
MDN reminds you that a gesture can end with touchcancel instead—always handle both if you track press/drag state. Browsers may also synthesize mouse / click events after touch, so avoid double actions.
💡
Beginner tip
For new cross-device UIs, prefer pointerup. Keep touchend when maintaining Touch Events code or touch-only flows.
Concept
Understanding touchend
An instance event that answers: “Did one or more fingers leave the surface?”
Trigger — touch points removed (normal lift).
Event type — TouchEvent; use changedTouches.
Bubbles — yes; cancelable behavior can vary by UA.
Remember — you may get touchcancel instead of touchend.
Limited availability on MDN (not Baseline)—desktop Safari often lacks Touch Events.
Foundation
📝 Syntax
Use the event name with addEventListener, or set the handler property:
Touch points that just changed (the ones that lifted)
touches
All current contacts still on the surface
targetTouches
Contacts that started on this target and are still down
altKey / ctrlKey / metaKey / shiftKey
Modifier keys at event time
Compare
⚖️ touchend vs Related Signals
Signal
Meaning
touchstart
Finger(s) touched the surface
touchmove
Finger(s) moved
touchend
Finger(s) lifted normally
touchcancel
Touch aborted / disrupted
pointerup
Pointer Events equivalent for lift / release
Cheat Sheet
⚡ Quick Reference
Goal
Code / note
Listen
el.addEventListener("touchend", fn)
Handler property
el.ontouchend = fn
Lifted points
event.changedTouches
Tap position
changedTouches[0].clientX / clientY
Also handle abort
Element touchcancel
MDN status
Limited availability (not Baseline)
Snapshot
🔍 At a Glance
Four facts to remember about touchend.
Event type
TouchEvent
changedTouches
Means
lifted
Normal end
Bubbles
true
Listen on el
Baseline
no
Limited availability
Hands-On
Examples Gallery
Patterns follow MDN Element: touchend event and the Touch events guide. Use a touch device or DevTools touch simulation; some labs include a button for desktop practice.
📚 Getting Started
Listen for lift and read the TouchEvent.
Example 1 — Log touchend
Print how many points lifted when the user releases.
JavaScript
const pad = document.getElementById("pad");
const out = document.getElementById("out");
pad.addEventListener("touchend", (event) => {
out.textContent =
"touchend · lifted=" + event.changedTouches.length;
});
touchend 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 touchend
Fires when touch points leave the surface. 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
touchendLimited
Bottom line: Use touchend for normal lifts in Touch Events code. Pair with touchcancel, and prefer pointerup for mouse + pen + touch together.
Wrap Up
Conclusion
touchend is the normal “finger up” signal in the Touch Events API. Read changedTouches, finish your gesture, also listen for touchcancel, and consider Pointer Events when you need the same idea across mouse, pen, and touch.
Test with DevTools touch simulation or a real phone
Prefer Pointer Events for new multi-input UIs
Watch for duplicate click after touch if you also handle mouse
❌ Don’t
Assume every gesture ends with touchend (cancel exists)
Look only in touches for the lifted point
Assume desktop Safari exposes Touch Events
Detect “mobile” only by checking for ontouchstart
Overwrite ontouchend if you need multiple listeners
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about touchend
Finger up—finish the gesture, and still prepare for cancel.
5
Core concepts
📱01
On lift
points removed
Trigger
📄02
TouchEvent
changedTouches
API
⇄03
vs cancel
lift ≠ abort
Compare
🎯04
Tap / drag
finish gesture
Pattern
👆05
Limited
prefer pointerup
Status
❓ Frequently Asked Questions
It fires when one or more touch points are removed from the touch surface—normally when the user lifts a finger. Remember you can get touchcancel instead if the touch is aborted.
No. MDN does not mark Element touchend 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 touch points that just lifted; also inspect touches and targetTouches as needed.
touchend is a normal lift. touchcancel means the system or browser aborted the touch—do not treat cancel as a successful tap.
User agents may dispatch mouse and click events after touch interactions. Prefer Pointer Events (pointerup) for unified handling, or be careful not to double-fire actions.
For cross-device UIs (mouse, pen, and touch), MDN recommends Pointer Events. pointerup is the close cousin of touchend.
Did you know?
After touchend, many browsers still fire mouse events and a click for compatibility. If you handle both touch and click, guard against running the same action twice.