-
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
Scrolling long content outside body not working #1056
Comments
In my case this solved it. <Dialog
open={isOpen}
onClose={() => setIsOpen(false)}
className="fixed z-10 inset-0 overflow-y-auto"
>
<div className="flex items-center justify-center min-h-screen">
<Dialog.Overlay className="fixed inset-0 bg-black opacity-30" />
<div className="relative bg-white rounded max-w-sm mx-auto">
<Dialog.Title>Complete your order</Dialog.Title>
{/* ... */}
</div>
</div>
</Dialog> to <Dialog
open={isOpen}
onClose={() => setIsOpen(false)}
className="fixed z-10 inset-0 overflow-y-auto"
>
{/* change wrapper to Dialog.Overlay as div */}
<Dialog.Overlay as="div" className="flex items-center justify-center min-h-screen">
{/* add pointer-events-none */}
<div className="fixed inset-0 bg-black opacity-30 pointer-events-none" />
<div className="relative bg-white rounded max-w-sm mx-auto">
<Dialog.Title>Complete your order</Dialog.Title>
{/* ... */}
</div>
</Dialog.Overlay>
</Dialog> |
Hey! Thank you for your bug report! This should be fixed by #1333, and will be available in the next release. You can already try it using However, in order to make it work properly, you have to update the Here is an updated CodeSandbox that includes the insiders build: https://codesandbox.io/s/lucid-worker-mnugrq?file=/src/App.js |
Perfect my friend, resolved the problem of centralizing the modal. I didn't understood the tricky element. But in fact it's tricky. Thank you! |
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
For example: v1.4.3
What browser are you using?
Chrome
Reproduction URL
https://codesandbox.io/s/divine-dream-b2mrd
Describe your issue
When I try to scroll outside of the dialog body, the scroll doesn't work. However, if you scroll inside the body, it works. Image example - https://prnt.sc/26g59lm
The text was updated successfully, but these errors were encountered: