[Webkit-unassigned] [Bug 260637] :focus-visible doesn't work when mouse is clicked

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 30 09:21:19 PDT 2024


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

freddiepingpong at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |freddiepingpong at gmail.com

--- Comment #2 from freddiepingpong at gmail.com ---
Looks like https://wpt.fyi/results/css/selectors/focus-visible-028.html now also tests for a related issue.

Background: https://github.com/web-platform-tests/wpt/pull/44873

> If the current modality is mouse, and focus is programmatically sent to another element, :focus-visible does not match, which is expected. If you then use keyboard afterwards, :focus-visible should match, as the current modality switched from mouse to keyboard. This functionality does not work in Safari if the following is true:

> The function that handles key events and .focus() utilizes .preventDefault().
> User's modality is not keyboard when focus is initially set programmatically.

This bug is readily apparent when using the keyboard to navigate our table (https://nimble.ni.dev/storybook/?path=/story/components-table--table). Keyboard only works well in all browsers, but keyboard navigation after a single mouse click produces wildly varying focus-visible behavior (only WebKit).

-- 
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/20240730/9b0ccf94/attachment.htm>


More information about the webkit-unassigned mailing list