Controlling initially focused element in modal dialog #4373
Unanswered
richbachman
asked this question in
Q&A
Replies: 1 comment
-
The |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm looking at the new
react-aria-components
, and am excited about using them for an upcoming project.Is it possible to control what element inside of a modal dialog is initially focused? Maybe something to how Reach UI handles it with a prop? https://reach.tech/dialog/#dialog-initialfocusref
I see in this example the
autofocus
prop passed toTextField
, but what if I want to set the focus to a specific button?Thank you in advance for the help.
Beta Was this translation helpful? Give feedback.
All reactions