In JavaScript, the pointerup event fires when a pointer is no longer active (MDN)—mouse last-button release, finger lift, or stylus lift. It is a PointerEvent. Remember you may get pointercancel instead.
Register a listener with addEventListener. Check readiness and browser support before you rely on this event.
Syntax
Listen for pointerup. Start with this line.
JavaScript
el.addEventListener("pointerup", fn)
Call
What it does
el.addEventListener("pointerup", fn)
Primary signature.
Built into the browser. Listen with el.addEventListener("pointerup", …) — no import required.
Library declarations
JavaScript
el.addEventListener("pointerup", fn)
Parameters
Parameter
Description
Event target
Required. Element listening for end
PointerEvent
Required. Id, type, coords, buttons
Return Value
Return Value
Description
*
Fires as an Element event (listener receives the Event object).
JavaScript Examples
Example 1 — Listen for pointerup
MDN-style listener — log when the pointer is no longer active.
Finish on up. Normal end clears state and completes the gesture.
Abort on cancel. MDN: cancel may replace up — still clear UI.
Don’t treat cancel as a click. Only successful up paths should commit actions.
Compatibility
Browser Support
Elementpointerup is Baseline Widely available on MDN (since July 2020). Pointer Events work across modern evergreen browsers.
✓ Baseline · Widely available
Element pointerup
PointerEvent when a pointer is no longer active — mouse, touch, and pen.
96%Modern browser support
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
pointerupExcellent
Bottom line: Safe for modern web apps. Pair with pointercancel for cleanup. Prefer click for accessible activate actions.
Frequently Asked Questions
It fires when a pointer is no longer active (MDN)—for example when a mouse’s last held button is released, a finger lifts, or a stylus lifts.
No. MDN marks Element pointerup as Baseline Widely available (since July 2020). It is not Deprecated, Experimental, or Non-standard.
A PointerEvent. Useful fields include pointerId, pointerType, isPrimary, clientX, and clientY.
With a physical mouse, mouseup fires whenever any button is released. pointerup fires only on the last button release; releasing earlier buttons while others stay held does not fire pointerup (MDN).
Yes. MDN notes it is possible to get pointercancel instead of a normal pointerup—for example when the browser aborts the gesture. Always clear state on both paths.
Use it to end unified mouse/touch/pen gestures started with pointerdown (drag release, ink lift). Keep primary activate actions on click for keyboard accessibility.