radix-ui / primitives

Radix Primitives is an open-source UI component library for building high-quality, accessible design systems and web apps. Maintained by @workos.
https://radix-ui.com/primitives
MIT License
15.51k stars 791 forks source link

focus-visible is triggered when opening a dialog with a button that contains svg #2953

Open aygee opened 3 months ago

aygee commented 3 months ago

Bug report

When a dialog is opened with a button that contains svg, :focus-visible style is triggered. This seems to happen on Safari on MacOS and also Safari and Chrome on iOS.

Current Behavior

https://github.com/radix-ui/primitives/assets/1481184/fbe8ed57-573b-4d20-9f96-5421d11290d5

Expected behavior

The :focus-visible style should not be triggered

Reproducible example

CodeSandbox Template

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-dialog ^1.0.5
Browser Safari on MacOS & iOS, Google Chrome on iOS MacOS/Safari v17.1.2, iOS v16.7.8