mspointercancel
mspointercancel
This page has been flagged with the following issues:
High-level issues:
Deletion Candidate: This information has been merged into dom/pointercancel
Experimental
Needs Summary: This article does not have a summary. Summaries give a brief overview of the topic and are automatically included on some listing pages that link to this article.
Overview Table
| Synchronous | ? |
|---|---|
| Bubbles | ? |
| Target | dom/Element |
| Cancelable | ? |
| Default action |
Needs Examples: This section should include examples.
Notes
This event occurs when the pointer (touch or pen contact) is removed from the system. Here are common reasons why this might happen:
- A touch contact is canceled by a pen coming into range of the surface.
- The device doesn't report an active contact for more than 100ms.
- A mapping for a device's monitor changes while contacts are active. For example, the user changes the position of a screen in a two screen configuration.
- The desktop is locked or the user logged off.
- The number of simultaneous contacts exceeds the number that the device can support. For example, if a device supports only two contact points, if the user has two fingers on a surface, and then touches it with a third finger, this event is raised.
When the onmspointercancel event is raised for a pointer, the app won’t receive any other events for that pointer, including onmspointerup . The app should perform any necessary cleanup as required for the pointer. For example, if the app maintains a pointer list, the app should remove the pointer from the list. You shouldn't treat this event like an onmspointerup event. When a pointer is removed, the app should cancel any ongoing work. The following example shows how you might handle pointer events if the target is a button:
- When the app receives an MSPointerDown event, highlight the button, and then show the button as pressed
- When the app receives an MSPointerUp (completed action) event remove the highlighting for the button and then show the button as raised, and execute the button's click handler
- When the app receives an onmspointercancel (aborted action) event, remove the highlighting for the button, show the button as raised, do any necessary clean up, and don't execute the button's click handler.
Note For more information about controlling touch behavior and using multi-touch, see Guidelines for Building Touch-friendly Sites.
Syntax
| HTML Attribute | < element onmspointercancel = "handler(event)"> |
| Event Property | object.onmspointercancel = handler; |
| addEventListener Method | object.addEventListener("MSPointerCancel", handler, useCapture) |
Event handler parameters
- handler [in]
- Type: Function
Compatibility
Desktop
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | ? | ? | ? | ? | ? |
Mobile
| Feature | Android | BlackBerry | Chrome for mobile | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Opera Mini | Safari Mobile |
|---|---|---|---|---|---|---|---|---|
| Basic support | ? | ? | ? | ? | ? | ? | ? | ? |
See also
Related pages (MSDN)
WindowElementdocumentMSPointerEvent<b/>onmspointerdownonmspointerupmsTouchActiononmsgesturehold
This article contains content originally from external sources.
Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]
This tool helps to make and review comments inline.
How to Use
insert instructions, with images, here