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

Unable to scroll #378

Open
sushanyadav opened this issue Jun 14, 2024 · 3 comments
Open

Unable to scroll #378

sushanyadav opened this issue Jun 14, 2024 · 3 comments

Comments

@sushanyadav
Copy link

sushanyadav commented Jun 14, 2024

I have a scrollable content inside Modal (Portal) which lives inside Drawer.

Link to reproduce:
https://stackblitz.com/edit/vitejs-vite-kizhhi

How to reproduce

  • Go to the link above
  • Click Open button
  • Click Open Dialog button inside Drawer
  • Try to scroll inside Dialog

Also on pressing "Esc" both drawer is being dismissed (expected to only dismiss modal if modal is active)

@joseph0926
Copy link

I think removing <Drawer.Overlay/> from App.jsx will fix the scrolling issue, is that correct?

@sushanyadav
Copy link
Author

I think removing <Drawer.Overlay/> from App.jsx will fix the scrolling issue, is that correct?

Yes, it does. Thanks.
So in this case, should we manually create an overlay component if we need an overlay on drawer?

@joseph0926
Copy link

joseph0926 commented Jul 4, 2024

I think removing <Drawer.Overlay/> from App.jsx will fix the scrolling issue, is that correct?

Yes, it does. Thanks.
So in this case, should we manually create an overlay component if we need an overlay on drawer?

Looking at the documentation again, it looks like You don't need to remove the <Drawer.Overlay>, you just need to change the modal attribute to false on the <Drawer.Root>.

<Drawer.Root modal={false}>


Based on the code you've provided, I'd probably write something like this to accomplish your intention

<Drawer.Root modal={!isOpen} direction="right">

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

2 participants