[Webkit-unassigned] [Bug 243749] blur and focusout are not fired on document.activeElements when they are removed from the dom

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 11 11:57:22 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=243749

--- Comment #2 from Rob Snow <rsnow at adobe.com> ---
Thanks for the quick reply. However, I would argue this is not good behavior.
It makes it very difficult to track and manage focus.

For example, if you have a focus scope that contains focus within it, you need to know when focus leaves it so you can move the focus back inside. A common example of this is a Dialog.

Right now, a blur event is not fired when the active element is removed from the dom, nor is a focus event fired on the body. So it's impossible to tell that focus moved outside of the scope.

https://html.spec.whatwg.org/multipage/interaction.html#focusing-steps
I know this isn't specific about what happens when an active element becomes inert. However, I think it's reasonable to assume that an element becoming inert must lose focus. Therefore, it should go through the unfocusing steps, and then become inert.

If this isn't the case, how would you recommend containing focus.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220811/652fac95/attachment-0001.htm>


More information about the webkit-unassigned mailing list