NEW247416
focus-visible is triggered when opening dialog using mouse
https://bugs.webkit.org/show_bug.cgi?id=247416
Summary focus-visible is triggered when opening dialog using mouse
Andreas Ehrencrona
Reported 2022-11-03 01:33:30 PDT
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.
Attachments
Repro (616 bytes, text/html)
2022-11-03 01:33 PDT, Andreas Ehrencrona
no flags
Radar WebKit Bug Importer
Comment 1 2022-11-10 00:34:18 PST
José Lages
Comment 3 2026-02-16 08:25:28 PST
Any news on a possible fix for this bug? Still happens on macos and ios.
José Lages
Comment 4 2026-02-16 08:26:44 PST
(In reply to José Lages from comment #3) > Any news on a possible fix for this bug? > > Still happens on macos and ios. and webview
Mateusz Daniluk
Comment 5 2026-03-05 05:00:00 PST
Alexey Proskuryakov
Comment 6 2026-03-05 11:02:41 PST
*** Bug 309245 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.