primitives icon indicating copy to clipboard operation
primitives copied to clipboard

[Dialog] Make portaled scroll containers scrollable

Open joaom00 opened this issue 2 years ago • 14 comments

Description

As the shards of RemoveScroll are not portal friendly, just moving RemoveScroll to Content solves the problem but this approach has shown to have a problem with OuterScrollable setup, i.e. the scroll event does not bubble up to Overlay if it happens in Content. So to cover this case I opted to render RemoveScroll in both Overlay and Content and enable/disable depending on whether Content is inside Overlay or not.

Fixes #1159

joaom00 avatar Jul 04 '23 16:07 joaom00

When will it be merged?

dogukanoksuz avatar Jul 17 '23 12:07 dogukanoksuz

excited for this 😄

sgrund14 avatar Jul 21 '23 14:07 sgrund14

@benoitgrelard @andy-hook please give a look, we're waiting exited, thanks!

kulgavy avatar Aug 02 '23 11:08 kulgavy

Hey everyone, any news on this? This is also blocking me and my team 👀 Thanks!

Rieranthony avatar Oct 11 '23 04:10 Rieranthony

Up

lramos33 avatar Oct 20 '23 19:10 lramos33

Up

lukasburns avatar Oct 23 '23 03:10 lukasburns

Also waiting for this. Is there any workaround for scrolling inside portaled Popover?

riccardolardi avatar Oct 24 '23 14:10 riccardolardi

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>

joaom00 avatar Oct 24 '23 15:10 joaom00

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?

riccardolardi avatar Oct 24 '23 15:10 riccardolardi

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

joaom00 avatar Oct 24 '23 16:10 joaom00

up 👀

tcolinpa avatar Oct 30 '23 22:10 tcolinpa

up 👀

jgoncalv avatar Mar 06 '24 09:03 jgoncalv

up

dogukanoksuz avatar Mar 07 '24 05:03 dogukanoksuz

@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/>

klingat avatar May 11 '24 22:05 klingat