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
75.38k stars 4.73k forks source link

[Bug]:When adding any element and the position of this element is at the top of the sheet or dialog box, then clicking on this element whose position is at the top of the page and then close the sheet or dialog close #3081

Open Haleem-rafat opened 8 months ago

Haleem-rafat commented 8 months ago

Describe the bug

When adding any element and the position of this element is at the top of the sheet or dialog box, then clicking on this element whose position is at the top of the page and then close the sheet or dialog close ex: For example, when adding an error message to a toast when closing that toast it closes to drag it directly closed sheet or dialog box

Or when adding a button in the top position 999 when the sheet or dialog box is open, it closes to drag it directly

Affected component/components

sheet and dialog

How to reproduce

I've added two pictures to explain how I do In the two images, you will find that the toast is above the sheet. When you click on it, the sheet closes automatically I also put a Feedback button in the User Snap Library, and when you click on it, it closes the sheet immediately. Screenshot 2024-03-21 101001 Screenshot 2024-03-21 101000

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

I am test on all OS mac and windows and Linux and test in fire fox and chrome

Before submitting

hrishikeshmane commented 6 months ago

+1

hrishikeshmane commented 6 months ago

@Haleem-rafat how did you fix this?

Haleem-rafat commented 6 months ago

@hrishikeshmane not fix yet

tranlehaiquan commented 5 months ago

This may be help https://github.com/shadcn-ui/ui/issues/842#issuecomment-2184916610

kartikxisk commented 2 months ago

+1