Closed
Bug 1382110
Opened 7 years ago
Closed 6 years ago
Click event is not triggerable by button::after
Categories
(Core :: DOM: Events, defect, P3)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
People
(Reporter: rexboy, Unassigned)
References
Details
(Keywords: css2, Whiteboard: [webcompat:p3])
Attachments
(1 file)
384 bytes,
text/html
|
Details |
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.
Updated•7 years ago
|
Component: General → DOM: Events
Product: Firefox → Core
Updated•7 years ago
|
Priority: -- → P3
Comment 2•7 years ago
|
||
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.
Updated•7 years ago
|
Flags: needinfo?(bugs)
Comment 3•7 years ago
|
||
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.
Updated•7 years ago
|
Comment 4•6 years ago
|
||
Setting to [webcompat:p3] since this affects functionality on Youtube.
Whiteboard: [webcompat] → [webcompat:p3]
Comment 5•6 years ago
|
||
This was fixed by Bug 1089326. \o/
(just marking as fixed, not a dupe. if someone cares, please change)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•