Open Bug 1741231 Opened 4 years ago Updated 3 years ago

Element inside disabled button should be able to fire event if button's parent is listening event

Categories

(Core :: DOM: Events, defect)

Firefox 94
defect

Tracking

()

UNCONFIRMED

People

(Reporter: tomchen.org, Unassigned)

References

(Blocks 1 open bug)

Details

Steps to reproduce:

When user clicks a normal element inside a disabled button, and a click event listener is attached to the button's parent, then, the event is not triggered in Firefox, but it is triggered in Chrome.

In the following example:
https://codesandbox.io/s/delicate-hooks-zf36v?file=/index.html

Click the text "Disabled button" inside the two big buttons.

Actual results:

In Chrome, both buttons will fire event;

in Firefox, the first button will fire event, but not the second one.

Expected results:

In Firefox, the second button should also fire event, I guess.

Well, actually I'm not sure what the spec say about this, but either Firefox or Chrome should change this and make the browsers behave in the same way.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Events' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → DOM: Events
Product: Firefox → Core
Blocks: 1656849

Kagami may know what we should do here.

Severity: -- → S3
Flags: needinfo?(krosylight)

Probably depends on:

Depends on: 1653882
Flags: needinfo?(krosylight)
You need to log in before you can comment on or make changes to this bug.