Skip to content

[Select] Select inside a Dialog causes react-remove-scroll-bar to throws an error #1670

@petrlr14

Description

@petrlr14

Bug report

Current Behavior

Hi, using a Select inside a Dialog throws the following error: react-remove-scroll-bar: cannot calculate scrollbar size because it is removed (overflow:hidden on body. I can see why is happening, but I don't know if there's any workaround for this problem.

Screen Shot 2022-09-16 at 17 05 58

Expected behavior

To not throw an error on nested portals

Reproducible example

I found an example online that works, but upgrading to Select 1.0.0 causes the same problem
Working example
Not working example

Suggested solution

Additional context

I'm using Next.js on my local machine, but in the codesandbox it's using client side rendering.

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-dialog, @radix-ui/react-select 1.0.0
React n/a 18.2.0
Browser
Assistive tech
Node n/a 16.17.0
npm/yarn 8.15.0
Operating System MacOS Monterrey 12.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions