In JavaScript, the pointerout event fires when a pointer leaves an element’s hit-test area (and in a few related cases such as non-hover pointerup or after pointercancel) (MDN). It is a bubbling PointerEvent — similar to mouseout.
Register a listener with addEventListener. Check readiness and browser support before you rely on this event.
Syntax
Listen for pointerout. Start with this line.
JavaScript
el.addEventListener("pointerout", fn)
Call
What it does
el.addEventListener("pointerout", fn)
Primary signature.
Built into the browser. Listen with el.addEventListener("pointerout", …) — no import required.
Library declarations
JavaScript
el.addEventListener("pointerout", fn)
Parameters
Parameter
Description
Event target
Required. Element listening for leave
PointerEvent
Required. Type, coords, relatedTarget
Return Value
Return Value
Description
*
Fires as an Element event (listener receives the Event object).
JavaScript Examples
Example 1 — Listen for pointerout
MDN-style listener — log when the pointer leaves the element.
JavaScript
const para = document.querySelector("p");
para.addEventListener("pointerout", (event) => {
console.log("Pointer moved out");
});
Choose pointerleave. MDN recommends it over pointerout for sensible whole-element exit.
Ignore child crossings. Moving parent → child does not fire leave.
No bubbling. Leave fires on the element itself when the pointer fully exits.
Keep pointerout when you need bubbling or per-child leave signals.
Compatibility
Browser Support
Elementpointerout is Baseline Widely available on MDN (since July 2020). Pointer Events work across modern evergreen browsers.
✓ Baseline · Widely available
Element pointerout
PointerEvent when a pointer leaves an element — bubbles; watch child crossings.
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
pointeroutExcellent
Bottom line: Safe for modern web apps. For whole-component hover exit, prefer pointerleave. Use pointerout when you need bubbling or per-child leave signals.
Frequently Asked Questions
It fires when a pointer leaves an element’s hit-test area, when pointerup fires on devices without hover, after pointercancel, or when a pen leaves digitizer hover range (MDN). It also fires when moving across child boundaries.
No. MDN marks Element pointerout as Baseline Widely available (since July 2020). It is not Deprecated, Experimental, or Non-standard.
A PointerEvent. Useful fields include pointerId, pointerType, relatedTarget, clientX, and clientY.
pointerout bubbles and also fires when moving from a parent into a child (or among child boundaries). pointerleave does not bubble and fires only when leaving the element and all descendants.
For whole-component hover exit without descendant noise, MDN notes pointerenter / pointerleave are usually more sensible than pointerover / pointerout.
When you want bubbling/delegation, or when you care about leaving individual children (for example highlighting each list item as the pointer exits it).