ui icon indicating copy to clipboard operation
ui copied to clipboard

[Question] Is this the default behaviour? Clicking a dropdown menu items triggers flash on sidebar scroll indicator

Open freshtechs opened this issue 1 year ago • 6 comments

When i click the elipsis button (in a separate component) the sidebar scroll indicator flash and shows as active

flashsidebar_AdobeExpress

freshtechs avatar May 06 '23 04:05 freshtechs

As far as I can tell, this is somehow adding height to your sidebar component and is not a shadcn/ui specific problem.

abhinav-anshul avatar May 06 '23 20:05 abhinav-anshul

@abhinav-anshul do you know a workarround? other than eliminating the heigth property?

freshtechs avatar May 06 '23 21:05 freshtechs

I need to see some bare minimum code. Do you have a codesandbox?

abhinav-anshul avatar May 06 '23 21:05 abhinav-anshul

It actually happens on shadcn's site. https://ui.shadcn.com/docs/components/dropdown-menu

Click any of the dropdowns and the scroll bar will disappear. Perhaps because the dropdown is just appended to body and not put in the specific place in the dom where the button is?

Seems to be an upstream issue: https://www.radix-ui.com/docs/primitives/components/dropdown-menu

Try this, working for me: https://github.com/radix-ui/primitives/issues/1272#issuecomment-1136899602

Sparticuz avatar May 31 '23 14:05 Sparticuz

It is an upstream issue, had the same experience with radix-ui, @Sparticuz suggestion works for that.

FelipeJz avatar Jun 11 '23 18:06 FelipeJz

Radix-UI uses react-remove-scrollbars as a dependency with 0 ways to disable it. There must have been a reason to do it this way but yes it is extremely jarring to the eye

SanderCokart avatar Jul 18 '23 20:07 SanderCokart

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.

shadcn avatar Jul 02 '24 23:07 shadcn