Closed Bug 1177528 Opened 4 years ago Closed Last year
CSS pointer-events: none; not working on pseudo-elements
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.
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
This bug was mentioned in this article: https://codepen.io/MartijnCuppens/full/MBjqbM/
That is actually bug 1089326, fwiw. That is, replacing the <button> for a <div> works.
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.
Per comment 4, but lmk if I got it wrong.
Status: UNCONFIRMED → RESOLVED
Closed: Last year
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.