Closed Bug 1382110 Opened 4 years ago Closed 2 years ago
Click event is not triggerable by button::after
See example: https://jsfiddle.net/xzb031x0/3/ 1. create a button and add onclick event listener 2. create an ::after element by css to that button 3. move ::after to an arbitrary position by "position: absolute" with "left:" and "top:" 4. try clicking on that after element Expected: The onclick listener to the button should be triggered. Actual: The onclick listener to the button is not triggered. If I'm using a div rather than a button, the behavior above no longer exist. This seems to be confused and I'm not sure if this is intentional. In some cases we have to use button rather than workaround by using div.
Maybe smaug knows what's up here?
I don't even know which spec might hint the right behavior here. Of course hit testing itself isn't spec'ed at all. But this has been our behavior forever.
Given that Edge, Chrome, and Safari all trigger click events in this test-case, and this is something that users are now noticing this on YouTube (see webcompat.com issue #13547), I think this is something we should address.
See Also: → https://webcompat.com/issues/13547
Setting to [webcompat:p3] since this affects functionality on Youtube.
Whiteboard: [webcompat] → [webcompat:p3]
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.