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

inert is removed *after* the exit transition of Dialog, instead of before #3506

Open
benface opened this issue Oct 4, 2024 · 0 comments
Open

Comments

@benface
Copy link

benface commented Oct 4, 2024

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

2.1.9

What browser are you using?

All

Reproduction URL

https://codesandbox.io/p/sandbox/kwk7yh

Describe your issue

When closing a Dialog that has an exit transition defined with the data attribute transition API introduced in Headless UI 2.1, elements outside the dialog have the inert attribute even during the exit transition. It gets removed at the end of the transition, instead of at the start, which would result in better UX for very fast users who want to interact with something else on the page right after closing the dialog. For instance, in the CodeSandbox, try closing the dialog by clicking where the "Open dialog" button is, and while it is closing, try clicking again. You should be able to (because of the data-[leave]:pointer-events-none class on the <Dialog>) but because the "Open dialog" button is inert, it doesn't work.

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

No branches or pull requests

1 participant