Skip to content

fix: soften 'never' in pointer-events:none description (fixes #44565)#44566

Open
nihalakp wants to merge 1 commit into
mdn:mainfrom
nihalakp:fix-pointer-events-none-description
Open

fix: soften 'never' in pointer-events:none description (fixes #44565)#44566
nihalakp wants to merge 1 commit into
mdn:mainfrom
nihalakp:fix-pointer-events-none-description

Conversation

@nihalakp

Copy link
Copy Markdown

Description

Updated the pointer-events: none description to replace "never" with "generally not" and added a clarifying sentence about the pointerenter/pointerleave exception.

Motivation

The word "never" in the opening sentence is technically inaccurate — pointerenter and pointerleave events can still fire on a parent with pointer-events: none when the pointer moves into or out of a hit-testable descendant. A Note block on the page already acknowledges this, but the main description contradicts it. This change makes the two consistent and more accurate for readers.

Additional details

Relates to the original issue #33633, which was closed after a Note block was added but the main description was not updated.

Related issues and pull requests

Fixes #44565
Relates to #33633

@nihalakp nihalakp requested a review from a team as a code owner June 24, 2026 07:14
@nihalakp nihalakp requested review from hamishwillee and removed request for a team June 24, 2026 07:14
@github-actions github-actions Bot added Content:CSS Cascading Style Sheets docs size/xs [PR only] 0-5 LoC changed labels Jun 24, 2026
- : 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs size/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: pointer-events: none description still says "never" after partial fix in #33633

3 participants