Bug 260637

Summary: :focus-visible doesn't work when mouse is clicked
Product: WebKit Reporter: shanmen.ng
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: annevk, ntim, rego, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

Description shanmen.ng 2023-08-23 16:57:47 PDT
Reproduction steps:
1. https://wpt.live/css/selectors/focus-visible-script-focus-014.html
2. Click on the body and click on the input.
3. Press tab.
4. Observe the test has failed.

This doesn't happen on just the body, but when the mouse is clicked, e.g.: https://jsfiddle.net/xrL26jc7/, click on the first input, then the second input and press tab. The focus-visible styles aren't applied.
Comment 1 Radar WebKit Bug Importer 2023-08-30 16:58:13 PDT
<rdar://problem/114732237>