[Webkit-unassigned] [Bug 241408] [selectors] Button click that triggers focus shouldn't cause :focus-visible, when the button contains an element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 27 22:18:08 PDT 2023


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

Matt Stow <matt at mattstow.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matt at mattstow.com

--- Comment #3 from Matt Stow <matt at mattstow.com> ---
I have just experienced this bug in a real project. Our design system's button components focus themselves onClick to workaround the known issue of focus being dropped to its nearest, focusable ancestor (https://bugs.webkit.org/show_bug.cgi?id=22261), but that unfortunately causes `:focus-visible` to become visible as logged here.

The fact that `pointer-events: none` on child elements fixes it for specific buttons, and then fixes it for all other buttons demonstrates that this is a bug.

Here is a reduced codepen example: https://codepen.io/stowball/pen/MWPoGqO

-- 
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/20230428/4dbc8587/attachment-0001.htm>


More information about the webkit-unassigned mailing list