Call a function when a touch is interrupted (for touch screens only):
Definition and Usage
touchcancel event occurs when a touch event is interrupted.
touchcancel event only works on touch screens.
Different devices interrupts a touch event at different actions. It is considered good practice to include this event to clean up code if this "error" should occur.
|touchstart||The user touches an element|
|touchmove||The user moves the finger across the screen|
|touchend||The user removes the finger from an element|
|touchcancel||The touch is interrupted|
Events that are triggered from the user interface belongs to the UiEvent Object.
|detail||A number with details about the event|
|view||A reference to the Window object where the event occurred|
|HTML tags:||All HTML elements|
ontouchcancel is a DOM Level 4 (2015) feature.
It is supported in all modern browsers:
ontouchcancel is not supported in Internet Explorer 11 (or earlier).