You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if a dialog is controlled by modelValue and does not use the DialogTrigger, focus cannot be handled properly (move focus back to the trigger after closing).
I suggest adding a triggerElement prop to the DialogRoot so that the user can specify which trigger was used to open the dialog.
Additional information
I intend to submit a PR for this feature.
I have already implemented and/or tested this feature.
The text was updated successfully, but these errors were encountered:
Thanks for the issue and PR @enkot . However I have different solution in mind, similar to Headless UI.. perhaps internally we can track the previous focus target, and focus on it again when the dialog close.
This way, user might need to not set additional prop, and have a more consistent behaviour. Imagine 2 buttons could trigger the same dialog.
Describe the feature
Currently, if a dialog is controlled by modelValue and does not use the DialogTrigger, focus cannot be handled properly (move focus back to the trigger after closing).
I suggest adding a
triggerElement
prop to theDialogRoot
so that the user can specify which trigger was used to open the dialog.Additional information
The text was updated successfully, but these errors were encountered: