Closed Bug 1582570 Opened 5 years ago Closed 5 years ago

dispatching click event on disabled button causes element onclick handlers to be fired

Categories

(Core :: DOM: Events, defect)

69 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 329509

People

(Reporter: paulgschwendtner, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36

Steps to reproduce:

Open: https://codepen.io/DevVersion/pen/LYPXWgB

Click on "Simulate click" button.

Actual results:

Notice that the alert opens up. This indicates the button "click event listener got fired. This is inconsistent with the previous behavior in Firefox 64.

All versions above Firefox 65 seem to emit the click event.

Expected results:

The click event should be cancelled since the button is disabled. This would match behavior with Chrome.

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

It's the expected result from bug 329509.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.