-
-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: focus trigger on dialog close #922
Conversation
@enkot would you want to try implement the suggestion here (#921 (comment))? Or you want to close this so others can tackle it 😁 |
Let me try 🙂 |
@zernonia Could you please check? Looks like this small change is enough 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice @enkot ! I think that could work!
Can you help add a simple test case for this? Particularly targeting the document.activeElement
after closing the modal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @enkot ! I've push some minor stuff yaaa 😁
Thank you!) 💚 |
Closes #921
Adds a
triggerElement
prop to the DialogRoot so that the user can specify which trigger was used to open the dialog.