Skip to content

Alternative to blur and focusout on removal #12842

Description

@noamr

What is the issue with the HTML Standard?

We've removed blur on removal from the HTML standard and replaced it with "focus fixup". This is great - however in blink we find it difficult to remove that in practice due to compat issues.

There are tools that use blur (or focusout) as a signal to recompute focus, and fall back to setInterval due to the behavior in WebKit/Gecko where blur is not firing on removal.

Since bringing back synchronous events on removal is out of the question, what if we could fire a blur events in those cases, asynchronously in the update the rendering steps? It can fire on the document element, or on the nearest still connected ancestor of the removed node.

This way listening to blur events would still be a good enough indicator of focus changing, but without the crashy baggage of synchronous on-removal events.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions