Skip to content

[Dialog][Popover] Scrolling issue when Popover inside Dialog #1159

Open
@hipstersmoothie

Description

@hipstersmoothie

Documentation

Relevant Radix Component(s)

Here in the docs it say to make Overlay a sibling to Content.

CleanShot 2022-02-15 at 11 02 22

This setup doesn't work if you have a scrollable popover in the dialog content. On this line a ref is passed to RemoveScroll but I think that by using just a ref that RemoveScroll doesn't consider the portalled element a part of the react tree.

In my own code I fixed this by putting my Content inside of my Overlay. After this change my scrollable popover could scroll again since RemoveScroll now has access to the react tree.

CleanShot 2022-02-15 at 11 07 04

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions