In JavaScript, lostpointercapture fires when a captured pointer is released (MDN). It is the end signal that pairs with gotpointercapture. The event type is a PointerEvent.
Register a listener with addEventListener. Check readiness and browser support before you rely on this event.
Syntax
Listen for lostpointercapture. Start with this line.
Capture on press. Keeps moves on the stage outside its box.
Mark start on got. Enter dragging mode when capture succeeds.
Clean up on lost. Always reset — even if the pointer left the element.
Why it matters. Prevents stuck “dragging” UI after release/cancel.
Compatibility
Browser Support
Element lostpointercapture is Baseline Widely available (MDN: since July 2020). Safe for drag/slider capture cleanup in modern evergreen browsers.
✓ Baseline · Widely available
Element lostpointercapture
PointerEvent when a captured pointer is released — established across browsers.
95%Widely available
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
Android WebViewSupported · Modern WebView
Full support
lostpointercaptureBaseline
Bottom line: Pair with gotpointercapture. Clean up drag state here so UI never sticks after release or cancel.
Frequently Asked Questions
It fires when a captured pointer is released (MDN). Capture can end via releasePointerCapture(), pointerup, pointercancel, or other release paths. Use it to clean up drag UI and session state.
No. MDN marks Element lostpointercapture as Baseline Widely available (since July 2020). It is not Deprecated, Experimental, or Non-standard.
A PointerEvent. Handy fields include pointerId, pointerType, and isPrimary.
After pointer capture ends for that element — for example when you call releasePointerCapture(pointerId), or when the pointer is released (pointerup) while capture was active.
gotpointercapture fires when setPointerCapture() succeeds and capture begins. lostpointercapture is the matching end signal.
So you can reset cursors, remove dragging classes, stop tracking moves, and restore idle UI when the capture session ends — even if the pointer left the element.