-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Portaling bugged with scrollable parents #4554
Comments
Thanks for reporting @Etheryte , There are several existing issues we'll round up and look to resolve regarding fixed positioning and portaling that will be the focus of development following the TypeScript rewrite that is currently underway. |
Can you set the Updated CodeSandbox: https://codesandbox.io/s/react-select-v3-sandbox-forked-un5el?file=/index.js |
@Methuselah96 Thanks for taking the time to look at this. While that would work for dropdowns which fit into the scrollable parent viewport (shown in light blue below), you will end up with cropping on longer dropdowns — the very problem that portaling is meant to solve. In short, setting the |
Thanks for the response, sorry I was confusing portaling with something else. As @ebonow mentioned we're taking a closer look at menu positioning and related issues at the moment so hopefully we can get this resolved. |
This is the same issue as reported in #4088, so I'm going to go ahead and close this in order to consolidate the issues. Thanks for the helpful reproduction case, we hope to make some progress on this soon. I've added this issue and example to the list of issues and examples on that issue. |
When using portaling, the dropdown position becomes bugged when a parent is scrolled while the dropdown is open.
Screen.Recording.2021-04-23.at.16.24.45.mov
Repro case: https://codesandbox.io/s/react-select-v3-sandbox-forked-lgkms
Also reproducible on the docs page if you manually edit the layout to have overflow.
This is a pretty common issue with dropdown libraries, common solutions include closing the dropdown on any parent scroll or trying to dynamically keep the position updated with a transform.
The text was updated successfully, but these errors were encountered: