[Webkit-unassigned] [Bug 219472] document.hasFocus() is true while URL bar has focus

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 4 11:52:02 PST 2020


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

--- Comment #6 from jib at mozilla.com ---
Yes, it's the browser engine's job to avoid creepiness wrt to camera. My fault for being unclear: the engine won't rely on the behavior of document.hasFocus(), we were merely planning to reference the same underlying algorithm https://html.spec.whatwg.org/multipage/interaction.html#has-focus-steps — But on reflection, it may not even be right given how other browsers behave wrt the url bar. Sorry for the side-track.

I'm not aware of any practical application of the document.hasFocus() API vis-à-vis the URL bar other than consistency.

I notice the same problem happens in iframes as well: https://jan-ivar.github.io/dummy/iframe_focus.html — which violates the existing spec even without my patch.

Not informing a web page about every little focus loss caused by browser-chrome widgets seems reasonable to me, but I don't see what the discrepancy between the blur/focus events and the hasFocus() function accomplishes, since the page is still told about the unfocusing, at least in the URL bar case I observed.

-- 
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/20201204/ac7c008e/attachment.htm>


More information about the webkit-unassigned mailing list