HTML onlostpointercapture Event Attribute
Description
The onlostpointercapture event attribute runs a script when an element loses pointer capture: when releasePointerCapture() is called, or automatically after pointerup or pointercancel.
It is a reliable place to end a drag operation, because it fires in every case where capture ends, including when the browser cancels the pointer.
Pointer events are a single set of events for all pointing devices: mouse, pen and touch. The event object is a PointerEvent, which extends MouseEvent with properties such as pointerId, pointerType ("mouse", "pen" or "touch"), pressure, width and height. For touch input, the CSS touch-action property controls whether the browser scrolls or zooms the page instead of sending pointer events.
Syntax
<element onlostpointercapture="script">
Values
- scriptThe name of the script to use when the event has been triggered.
Example
Browser Support
The following information will show you the current browser support for the HTML onlostpointercapture event attribute. Hover over a browser icon to see the version that first introduced support for this HTML event attribute.
Desktop





Tablets & Mobile





