Closed Bug 1650091 Opened 5 years ago Closed 5 years ago

Removing a button does not fire blur events

Categories

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

77 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 559561

People

(Reporter: silbermann.sebastian, Unassigned)

References

()

Details

(Keywords: parity-chrome, testcase)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36

Steps to reproduce:

Removed a focused <button>.
https://jsfiddle.net/k8jgor3b/2/ to repro (should log "blurred" twice) using Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0

Actual results:

document.activeElement switches from button to body without a blur event being fired on the button.

Expected results:

Blur event should've been fired according to https://www.w3.org/TR/uievents/#event-type-blur:

A user agent MUST dispatch this event when an event target loses focus.

Chrome 83 implements the expected behavior.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Has STR: --- → yes
Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core
You need to log in before you can comment on or make changes to this bug.