Open Bug 1884450 Opened 2 years ago Updated 2 years ago

An output element nested within a label element receives two click events

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P2)

Firefox 123
defect

Tracking

()

People

(Reporter: ivan, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

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.

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.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core
Blocks: 229925
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached file standalone html
No longer blocks: 229925
Keywords: regression
Regressed by: 229925

: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.

Flags: needinfo?(arai.unmht)
Severity: -- → S3
Priority: -- → P2
See Also: → 1831650
Flags: needinfo?(arai.unmht)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: