| Summary: | focus-visible is triggered when opening dialog using mouse | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Andreas Ehrencrona <andreas.ehrencrona> | ||||
| Component: | Forms | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Minor | CC: | brian, cdumez, mmaxfield, ntim, webkit-bug-importer, wenson_hsieh | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Safari Technology Preview | ||||||
| Hardware: | Mac (Apple Silicon) | ||||||
| OS: | macOS 13 | ||||||
| Attachments: |
|
||||||
This affects iOS too. Additional repro: https://developer.mozilla.org/en-US/play?id=rinvhv4MRjLWRSyElPfnYRbOVnUv3WDOuI9WLVn0DjHYPdO2rPvcp1b5itMuo4KLtQ2QRjEdUUvv0oqn |
Created attachment 463380 [details] Repro When opening a dialog using `showModal`, the first focusable element is given focus. So far so good. However, the element always receives a focus highlight. In fact, `:focus-visible` is triggered. I would expect this not happen if I use a mouse to open the dialog. See the attached reproduction, where clicking the open button shows a dialog with button with a pink border. The pink border is from a `:focus-visible` style.