-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
Drawer component behaves unexpectdly with Forms, Input Field Loses Focus and Draggable Class Added on Click. #2247
Comments
Not sure but it might be related to these, haven't found any fixes yet. |
Also this is happening on chrome/chromium browsers - namely edge/chrome. |
Also have the same issue with inputs. |
I'm having the opposite issue---I can focus on inputs but dragging seems to be broken (Firefox Developer Edition) |
Also having same issue. Specifically with shadcn Form element. Not an issue when using regular |
I found an alternative to keep the focus on the input when clicking, in return the drawer can no longer be moved when dragging from the input area. Add this to your input component :
|
This issue is still ongoing Adding stopPropagation onpointerdown to the input fix it completely tho |
I also have this issue with input, and textarea. |
@shadcn You should consider adding this solution (or a better one) to this component. |
i have exactly the same problem does anyone find a proper solution other than onPointerDown because it didn't work for me |
Esta opção funcionou, eu estava com um dentro do Drawer e o calendário do input não abria
|
@itse4elhaam @AdiRishi @ramyjaber1 @shadcn Here's how to simply fix this problem without sacrificing anything modify the drawer component in src/components/ui/drawer.tsx and do this |
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. |
i still have same issue |
hey @AdiRishi got any way to fix your issue? |
I was able to fix this by adding to
|
we are still facing this issue with recent versions |
Fixed when adding |
I had the same problem, but my Inputs were inside a I managed to solve the Dialog problem by following the recommendations in the comments:
After these changes, the use of inputs in the In my research, I didn't find any suggestion that worked for my case. But when I studied the Correction:
Hope this helps. |
I have a form inside the drawer, text area and selects both work fine but input tags don't get focused when clicked by a mouse, it works when using tab though.
I think the drawer doesn't differentiate correctly between dragging click and input focus click.
To Reproduce, create a drawer component with a form inside it which contains input fields, I used Shadcn Input, Labels, Selects and everything.
Loved the new components but this issue is really bothering me.
The text was updated successfully, but these errors were encountered: