-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
ScrollArea not working inside a Popover #542
Comments
I've found I have to set a height value for this to work. Try with just 'h-16' as a className. Scrolling with the mouse wheel doesn't seem to work though. |
Personally I fixed it by setting |
I had the same problem but reversed, a popover inside a scrollarea would not stay open. Using the setting |
Had the same problem using Commad and CommandList inside Popover. I had set overflow-y-auto and a max height on the CommandList. The scroll bar was showing and I could drag it, but scroll wheel was not working. When I pass modal={true} to the Popover, it scrolls normally. Setting height in CommandList didn't solve the problem. |
@mattiaz9 Thank you for this. setting Popover to modal fixed it for me as well |
Thank you so much, it works |
@mattiaz9 Thanks! It works. |
@mattiaz9 thanks!
|
Try using "h-" instead of "max-h-" for setting the height of a scroll area. |
if i have an empty list, "h-" wouldn't make sense. I would love to be able to use "max-h-" unfortunately Its not working. |
For max-h, it needs to be set on the radix viewport, like this: <ScrollArea className={'[&>[data-radix-scroll-area-viewport]]:max-h-[300px]'}> |
@ArmandFrvr thanks for the solution. For me it works like a charm :) |
thanks. worked for me |
Worked for me, thanks! |
Adding I'm using Popover with a Scroll Area for search results that appear as you are typing. I can prevent focus from being pulled into the popover but if focus is given to the popover at all (by scroll, tapping, etc), I can no longer re-focus on my input, because the |
I can confirm the solution posted by @ArmandFrvr works when the |
Thank you for your solution it worked for me like a charm :) |
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you. |
Thanks. It works for me. |
Scrolling still does not work in the iPad Chrome environment. |
working for me |
@panzacoder , did you find the answer? I faced the similar issue. |
Has anyone overcome this issue when the popover is part of a modal/dialog? I had the property modal={true} already set so I am not sure what the fix would be. Any help would be much appreciated!
|
Thanks! It works |
This is a code example:
The scrollbar appears but the scroll isn't working inside the content, only when i'm hovering over the scrollbar itself.
The text was updated successfully, but these errors were encountered: