Skip to content
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

Merged
merged 9 commits into from
May 17, 2024

Conversation

enkot
Copy link
Contributor

@enkot enkot commented May 14, 2024

Closes #921

Adds a triggerElement prop to the DialogRoot so that the user can specify which trigger was used to open the dialog.

@zernonia zernonia marked this pull request as draft May 15, 2024 10:42
@zernonia
Copy link
Collaborator

@enkot would you want to try implement the suggestion here (#921 (comment))? Or you want to close this so others can tackle it 😁

@enkot
Copy link
Contributor Author

enkot commented May 15, 2024

Let me try 🙂

@enkot
Copy link
Contributor Author

enkot commented May 15, 2024

Copy link
Collaborator

@zernonia zernonia left a 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.

@zernonia zernonia marked this pull request as ready for review May 17, 2024 02:51
Copy link
Collaborator

@zernonia zernonia left a 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 😁

@zernonia zernonia merged commit bcf3a6c into radix-vue:main May 17, 2024
3 checks passed
@enkot
Copy link
Contributor Author

enkot commented May 17, 2024

Thanks for the PR @enkot ! I've push some minor stuff yaaa 😁

Thank you!) 💚

@enkot enkot changed the title feat: triggerElement prop for DialogRoot feat: focus trigger on dialog close May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Focus trigger on dialog close
2 participants