No focus event when the focused element gets removed

RESOLVED DUPLICATE of bug 559561

Status

()

Core
Disability Access APIs
RESOLVED DUPLICATE of bug 559561
2 years ago
2 years ago

People

(Reporter: Jamie, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
x86
Windows
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
STR:
1. Open this: data:text/html,<button onClick="this.parentNode.removeChild(this);">Remove</button>
2. Focus the button.
3. Press it.
Expected: Focus should be fired on the document.
Actual: No focus event.

Note that:
1. document.activeElement does return the body.
2. The document accessible does get the focused state.
Blocks: 472809

Comment 1

2 years ago
There's no DOM focus per

data:text/html,<button onClick="this.parentNode.removeChild(this);">Remove</button><script>document.addEventListener('focus', e => console.log(e.target), true);</script>

Neil, what do you think?
Flags: needinfo?(enndeakin)

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Flags: needinfo?(enndeakin)
Resolution: --- → DUPLICATE
Duplicate of bug: 559561

Comment 3

2 years ago
(In reply to Neil Deakin from comment #2)
> 
> *** This bug has been marked as a duplicate of bug 559561 ***

Thanks, Neil!

I'm curious if the document should not be focused in addition to 'blur' event, since it looks like an accessibility/usability issue.

Jamie, how hard does it beat NVDA users?
You need to log in before you can comment on or make changes to this bug.