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.
What is the issue with the HTML Standard?
We've removed
bluron 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(orfocusout) as a signal to recompute focus, and fall back tosetIntervaldue to the behavior in WebKit/Gecko wherebluris not firing on removal.Since bringing back synchronous events on removal is out of the question, what if we could fire a
blurevents in those cases, asynchronously in theupdate 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
blurevents would still be a good enough indicator of focus changing, but without the crashy baggage of synchronous on-removal events.