In JavaScript, the touchcancel event fires when one or more touch points have been disrupted in an implementation-specific way (MDN). The event object is a TouchEvent.
Register a listener with addEventListener. Check readiness and browser support before you rely on this event.
Syntax
Listen for touchcancel. Start with this line.
JavaScript
el.addEventListener("touchcancel", fn)
Call
What it does
el.addEventListener("touchcancel", fn)
Primary signature.
Built into the browser. Listen with el.addEventListener("touchcancel", …) — no import required.
Library declarations
JavaScript
el.addEventListener("touchcancel", fn)
Parameters
Parameter
Description
Event name
Required. "touchcancel"
Handler prop
Optional. ontouchcancel
TouchEvent
Required. changedTouches, touches, …
Cleanup
Required. Reset UI / drop in-progress state
Return Value
Return Value
Description
*
Fires as an Element event (listener receives the Event object).
Set a flag on start.touchstart means a gesture is in progress.
Normal path:touchend finishes and clears the flag.
Abort path:touchcancel clears state without “success” logic.
Why it matters: without cancel cleanup, drag UI can stick after Home/rotate.
Compatibility
Browser Support
Element touchcancel is a standard Touch Events API event. MDN marks it Limited availability (not Baseline) — support varies across widely used browsers.
✓ Limited availability
Element touchcancel
Fires when touch points are disrupted — pair with touchstart / touchend for full gesture cleanup.
VariesNot Baseline
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
touchcancelFeature-detect
Bottom line: Always feature-detect. Prefer addEventListener. Use touchend for normal lift and touchcancel for aborted touches. See the MDN touchcancel reference.
Frequently Asked Questions
It fires when one or more touch points are disrupted in an implementation-specific way (MDN)—for example Home/app switch, screen rotation, palm rejection, touch-action stopping the gesture, or too many fingers.
No. MDN does not mark Element touchcancel as Deprecated, Experimental, or Non-standard. It has Limited availability (not Baseline) because support is missing or limited in some widely used browsers.
A TouchEvent. Use changedTouches for the touch points that were canceled; also inspect touches and targetTouches as needed.
touchend means the user lifted a finger normally. touchcancel means the system or browser aborted the touch—treat it as cleanup, not a successful tap or drag end.
For cross-device UIs (mouse, pen, and touch), prefer Pointer Events. pointercancel is the close cousin of touchcancel for aborted pointers.
Use DevTools device mode with touch simulation, or the Simulate cancel control on this page. On a phone, press Home or rotate while touching the page.