-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Bug]: On Tailwind CSS v2.2.0, dialog's overlay appears over the top of the dialog box #628
Comments
Vue package also has the same situation |
It looks like the issue is caused by changes to the Adding The change is detailed in the release notes under |
@adamwathan are you aware of this issue in relation to the latest Tailwind release? Not sure if it needs to be considered for the next release of Tailwind, or if it's something that needs to be fixed with an update to Headless UI. Thanks |
Hey! Yeah so this is because the One quick fix is to just replace |
Super, thanks @adamwathan, really appreciate you taking at look at this one so quickly :) |
Thanks - confirmed that either swapping |
I'm still seeing this and I don't even have a Here's a sandbox: https://codesandbox.io/s/suspicious-water-2tono?file=/src/App.tsx Any idea what's going wrong? |
@mikecousins you need to set the the For me the issue was that the css variable
Apparently this doesn't work and the 3 directives need to be declared in the same file:
With this in place the |
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
1.2.0
What browser are you using?
Firefox
Reproduction repository
I can't because it's commercially sensitive
Describe your issue
I've updated Tailwind CSS in my project to 2.2.0 today and noticed that whenever I open a modal dialog, after the brief transition effect, the 'fixed' background overlay then sits over the top of the dialog box.
The overlay has an onClick event handler to hide the dialog, which means currently anywhere you click in the dialog box, it is then closed.
The only things that are still sitting over the top of the overlay are items within the dialog which have "absolute" or "relative" classes.
Sorry I'm unable to link to a repo or video and don't currently have time to create a separate demo repo, but code is essentially identical to this example: https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/pages/dialog/dialog.tsx
The text was updated successfully, but these errors were encountered: