Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ The `pointer-events` property is specified as a single keyword chosen from the l
- `auto`
- : The element behaves as it would if the `pointer-events` property were not specified. In SVG content, this value and the value `visiblePainted` have the same effect.
- `none`
- : The element on its own is never the [target](/en-US/docs/Web/API/Event/target) of pointer events. However its subtree could be kept targetable by setting `pointer-events` to some other value. In these circumstances, pointer events will trigger event listeners on this parent element as appropriate on their way to or from the descendant during the event capture and [bubble](/en-US/docs/Web/API/Event/bubbles) phases.
- : The element on its own is generally not the [target](/en-US/docs/Web/API/Event/target) of pointer events. However its subtree could be kept targetable by setting `pointer-events` to some other value. In these circumstances, pointer events will trigger event listeners on this parent element as appropriate on their way to or from the descendant during the event capture and [bubble](/en-US/docs/Web/API/Event/bubbles) phases. Note that `pointerenter` and `pointerleave` events are exceptions — they will still fire on a parent with `pointer-events: none` when the pointer moves into or out of a descendant that is hit-testable.

@hamishwillee hamishwillee Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nihalakp Thanks for this.

  1. If you plan on fixing your own issue you don't need to create an issue - just a PR. However if you do create an issue then you should usually wait for triage.
  2. I think you're correct - "never" is wrong. I suspect "on its own" was supposed to capture that an element with no descendents would not be a target, but it misses that there are genuine exceptions in pointerenter and pointerleave.
  3. My problem with this is that there is way too much duplication in having your sentence "Note that pointerenter ... immediately followed by the note, which covers much the same ground.
    A possible fix is to mention the exception up front and then rely on the note - see below.
Suggested change
- : The element on its own is generally not the [target](/en-US/docs/Web/API/Event/target) of pointer events. However its subtree could be kept targetable by setting `pointer-events` to some other value. In these circumstances, pointer events will trigger event listeners on this parent element as appropriate on their way to or from the descendant during the event capture and [bubble](/en-US/docs/Web/API/Event/bubbles) phases. Note that `pointerenter` and `pointerleave` events are exceptions — they will still fire on a parent with `pointer-events: none` when the pointer moves into or out of a descendant that is hit-testable.
- : The element is generally not the [target](/en-US/docs/Web/API/Event/target) of pointer events, with the exception of `pointerenter` and `pointerleave` events fired at the element or its descendents.
Note that pointer events targeted at descendents (that don't set `pointer-events` to `none`) will still trigger event listeners on this parent element during the event capture and [bubble](/en-US/docs/Web/API/Event/bubbles) phases.

Happy for you to propose an alternative that removes the duplication if this isn't quite correct.


> [!NOTE]
> The `pointerenter` and `pointerleave` events are fired when a pointing device is moved into an element or one of its descendants. So, even if `pointer-events: none` is set on the parent and not set on children, the events are triggered on the parent after the pointer is moved in or out of a descendant.
Expand Down