An output element nested within a label element receives two click events
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P2)
Tracking
()
People
(Reporter: ivan, Unassigned)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
|
642 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0
Steps to reproduce:
I attached a click handler to an <output> element that was nested within a <label> element and clicked the <output> element.
Eg:
<label>
<output></output>
</label>
document.querySelector("output").addEventListener("click", function(e) {
console.log(e.timeStamp);
});
A more practical example is at https://jsfiddle.net/p75usy28/
Actual results:
The click handler was called twice.
Sample console output for a single click:
2029
2052
Expected results:
The click handler should be called once per click.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: UI Events & Focus Handling' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Comment 4•2 years ago
|
||
:arai, since you are the author of the regressor, bug 229925, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 5•2 years ago
|
||
per https://bugzilla.mozilla.org/show_bug.cgi?id=1831650#c9, bug 1831650 should also fix this.
Updated•2 years ago
|
Description
•