Closed
Bug 1177528
Opened 9 years ago
Closed 6 years ago
CSS pointer-events: none; not working on pseudo-elements
Categories
(Core :: DOM: Events, defect, P5)
Tracking
()
RESOLVED
INVALID
People
(Reporter: github, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.6.3 (KHTML, like Gecko) Version/8.0.6 Safari/600.6.3 Steps to reproduce: i added pointer-events: none; to a pseudo element. Actual results: the pseudo element is still the target of mouse events. Expected results: the pseudo element should ignore mouse events.
Reporter | ||
Updated•9 years ago
|
OS: Unspecified → Mac OS X
Comment 1•9 years ago
|
||
Presumably we do the pointer-events check on the actual target of the event, which is the non-anonymous element, not the pseudo-element...
Component: CSS Parsing and Computation → DOM: Events
Updated•8 years ago
|
Updated•6 years ago
|
Blocks: css-pseudo-4
Updated•6 years ago
|
Priority: -- → P5
Comment 2•6 years ago
|
||
This bug was mentioned in this article: https://codepen.io/MartijnCuppens/full/MBjqbM/
Flags: needinfo?(emilio)
Comment 3•6 years ago
|
||
That is actually bug 1089326, fwiw. That is, replacing the <button> for a <div> works.
Comment 4•6 years ago
|
||
I think this is working as expected actually. Our behavior is consistent with chrome here and I think this makes sense. The behavior for pseudos is equivalent to: <span onclick="alert(1)"><span style="pointer-events: none">Clicking me alerts</span></span> So I think this is invalid.
Flags: needinfo?(emilio)
Comment 5•6 years ago
|
||
Per comment 4, but lmk if I got it wrong.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•