[Tooltip] Opens on focus in Safari when :focus-visible
isn't applied in some cases
#1217
Labels
browser: Safari
bug 🐛
Something doesn't work
component: tooltip
This is the name of the generic UI component, not the React module!
Safari has/had a bug where it has to use a fallback to detect
:focus-visible
, but it doesn't work when a pointer event hasn't fired on the trigger yet.Possibly remove the polyfill or find a fix for it.
Source: https://github.com/floating-ui/floating-ui/blob/b80ccaf9cfd7f80f28546906c60284c8385940f0/packages/react/src/hooks/useFocus.ts#L118-L130
keyboardModalityRef.current
istrue
upon mount, and only gets set tofalse
if it detectsonPointerDown
on the reference, which doesn't occur when a trigger is the first element focused inside a dialog for instance.Workaround
Currently it can be worked around by setting the
initialFocus
on an element without a tooltip, or the popup itself.The text was updated successfully, but these errors were encountered: