Document: pointerout event
The pointerout
event is fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing the pointerup
event for a device that does not support hover (see pointerup
); after firing the pointercancel
event (see pointercancel
); when a pen stylus leaves the hover range detectable by the digitizer.
Bubbles | Yes |
---|---|
Cancelable | Yes |
Interface | PointerEvent |
Event handler property | onpointerout |
Examples
Using addEventListener()
:
document.addEventListener('pointerout', (event) => { console.log('Pointer moved out'); });
Using the onpointerout
event handler property:
document.onpointerout = (event) => { console.log('Pointer moved out'); };
Specifications
Specification |
---|
Pointer Events # the-pointerout-event |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
pointerout_event |
55 |
12
12-79
|
59
29
|
11
10
|
42 |
13 |
55 |
55 |
79
29
|
42 |
13 |
6.0 |
See also
gotpointercapture
lostpointercapture
pointerover
pointerenter
pointerdown
pointermove
pointerup
pointercancel
pointerleave
-
onpointerout
event handler property - This event on
HTMLElement
targets:pointerout
event
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Document/pointerout_event