adobe/react-spectrum

isFocusVisible is not set on elements using react-hook-form

已關閉

#6,809 建立於 2024年7月31日

 (12 則留言) (1 個反應) (0 位負責人)TypeScript (1,500 個分叉)auto 404
FormRACbughelp wanted

倉庫指標

星標
 (15,634 顆星)
PR 合併指標
 (平均合併 8天 2小時) (30 天內合併 80 個 PR)

描述

Provide a general summary of the issue here

When I use react-hook-form I cannot focus WITH isFocusVisible on the Select element.

The Select element itself gets the focus but without the isFocusVisible I cannot render a propper ring around the select.

https://github.com/user-attachments/assets/eed2395a-abfa-4ac5-ab0b-29cd4c0e3e0b

NOTE: I do understand that the components exposes a isFocused property that i could use to render the outline but that also means that after I select an element the outline will still be visible which is unwanted behavior.

🤔 Expected Behavior?

Once focus is set on the component via react-hook-form it should add the isFocusVisible property to it so the outline is shown.

😯 Current Behavior

No isFocusVisible gets set for Select, RadioGroup, CheckboxGroup etc...

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

https://github.com/zommerberg/react-aria-hook-form-bug

Version

"react-aria-components": "^1.3.1",

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

If other, please specify.

No response

What operating system are you using?

Windows 11

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

貢獻者指南