-
Notifications
You must be signed in to change notification settings - Fork 874
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
[Dialog] Make portaled scroll containers scrollable #2250
base: main
Are you sure you want to change the base?
Conversation
When will it be merged? |
excited for this 😄 |
@benoitgrelard @andy-hook please give a look, we're waiting exited, thanks! |
Hey everyone, any news on this? This is also blocking me and my team 👀 Thanks! |
Up |
1 similar comment
Up |
Also waiting for this. Is there any workaround for scrolling inside portaled Popover? |
Try wrapper the dialog content with the overlay <Dialog.Overlay>
<Dialog.Content>
...
</Dialog.Content>
</Dialog.Overlay> |
Thank you but I'm using the Popover primitive, which does not offer any Overlay. Is there any way to get around it with Popover too? |
Maybe your issue is different. This PR is for a specific issue when used within Dialog. Would you mind opening a ticket and sharing a reproduction example there? Thanks |
up 👀 |
1 similar comment
up 👀 |
up |
@joaom00 Thank you for you solution, it fixed my exact problem! Had my overlay like this: <Ovelay />
<Content>...</Content> and changing to this made everything still behave the same, but fixes the scroll issue: <Overlay>
<Content>...</Content>
<Overlay/> |
### Description The Radix docs seemed to incorrectly layout the example dialog in a way that doesn't allow for scrolling inside of it. Wrapping the Overlay around the content seems to fix that issue, see; radix-ui/primitives#2250 (comment) ### Tasks [KNO-6257](https://linear.app/knock/issue/KNO-6257/[dashboard]-unable-to-scroll-in-editor-pop-out)
Description
As the
shards
ofRemoveScroll
are not portal friendly, just movingRemoveScroll
toContent
solves the problem but this approach has shown to have a problem withOuterScrollable
setup, i.e. the scroll event does not bubble up toOverlay
if it happens inContent
. So to cover this case I opted to renderRemoveScroll
in bothOverlay
andContent
and enable/disable depending on whetherContent
is insideOverlay
or not.Fixes #1159