shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
71.1k stars 4.28k forks source link

When two popovers are added one inside the other, it creates a flickering effect. #1053

Closed BahlulHasanli closed 3 months ago

BahlulHasanli commented 1 year ago

Encountering a bug: When integrating the calendar component within the popover component, the calendar shakes twice unexpectedly.

bug

code

shamar-morrison commented 1 year ago

this may be a shot in the dark but have you tried wrapping your entire component in a Form?

There is an example on the website which does what you're trying to do I believe and the main difference (that I can see) is that its wrapped in a Form component

https://ui.shadcn.com/docs/components/calendar

shadcn commented 1 year ago

@BahlulHasanli Can you help me reproduce this? Here's a CodeSandbox link: https://codesandbox.io/p/sandbox/github/shadcn/next-template-debug/tree/main

You can fork it and add the code above to it.

BahlulHasanli commented 1 year ago

Hi @shadcn you can try here

https://codesandbox.io/p/sandbox/exciting-bardeen-lvmtrd

ak274 commented 1 year ago

I'm also facing the same flickering when using the date picker inside a dialog. It seems anywhere where I use animated components inside a dialog flickering happens. Alert Dialog inside a dialog also has same issue.

FaryarKankash commented 1 year ago

i have flickering problem on my popover, dialog and accordion.

https://github.com/shadcn-ui/ui/assets/107303813/e5c9d3b6-ec13-480e-8200-ff3a0efbacdc

shadcn commented 3 months ago

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.