The touchcancel event is fired when a touch point has been disrupted in an implementation-specific manner (for example, too many touch points are created).
General info
- Specification
- Touch Events
- Interface
- TouchEvent
- Bubbles
- Yes
- Cancelable
- No
- Target
- Document, Element
- Default Action
- None
Properties
| Property | Type | Description | 
|---|---|---|
| targetRead only | EventTarget | The event target (the topmost target in the DOM tree). | 
| typeRead only | DOMString | The type of event. | 
| bubblesRead only | Boolean | Whether the event normally bubbles or not | 
| cancelableRead only | Boolean | Whether the event is cancellable or not? | 
| viewRead only | WindowProxy | document.defaultView(windowof the document) | 
| detailRead only | long(float) | 0. | 
| touchesRead only | TouchList | A list of Touches for every point of contact currently touching the surface. | 
| targetTouchesRead only | TouchList | A list of Touches for every point of contact that is touching the surface and started on the element that is the target of the current event. | 
| changedTouchesRead only | TouchList | A list of Touches for every point of contact which contributed to the event.For the touchstart event this must be a list of the touch points that just became active with the current event. For the touchmove event this must be a list of the touch points that have moved since the last event. For the touchend and touchcancel events this must be a list of the touch points that have just been removed from the surface. | 
| ctrlKeyRead only | boolean | trueif the control key was down when the event was fired.falseotherwise. | 
| shiftKeyRead only | boolean | trueif the shift key was down when the event was fired.falseotherwise. | 
| altKeyRead only | boolean | trueif the alt key was down when the event was fired.falseotherwise. | 
| metaKeyRead only | boolean | trueif the meta key was down when the event was fired.falseotherwise. | 
Examples
Code samples for those events are available on the dedicated page: Touch events.
Browser compatibility
| 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 | 
| Feature | Android | Android Webview | Chrome for Android | Edge | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile | 
|---|---|---|---|---|---|---|---|---|---|
| Basic support | (Yes) | (Yes) | (Yes) | (Yes) | 6.0 (6.0) | (Yes) | 11 | (Yes) | (Yes) | 
[1] Touch events were implemented in Gecko 18.0, but removed again in 24.0 (Firefox 24.0 / Thunderbird 24.0 / SeaMonkey 2.21) on the desktop version of Firefox due to web compatibility issues (bug 888304).
[2] As of Gecko 52.0, touch events support has been fixed and reenabled in Windows desktop platforms.
Related Events
Document Tags and Contributors
    
    Tags: 
    
  
                    
                       Contributors to this page: 
        erikadoyle, 
        chrisdavidmills, 
        AFBarstow, 
        teoli, 
        Sheppy, 
        ethertank, 
        RedYeti, 
        louisremi
                    
                    
                       Last updated by:
                      erikadoyle,