Skip to content

[bug]: Issue with Drawer Height in iOS Safari for ShadCN Component #5260

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

Open
2 tasks done
mohanvgts opened this issue Oct 9, 2024 · 4 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@mohanvgts
Copy link

Describe the bug

Issue with Drawer Height in iOS Safari for ShadCN Component I’m working on implementing a form page within a drawer using the ShadCN component. The functionality involves clicking a button to open the drawer and automatically focusing on an input field.

This works perfectly on Android devices, but on iOS devices (specifically Safari), I'm encountering an issue with the drawer height when the keyboard opens. The height seems to shrink and doesn’t behave as expected.

Affected component/components

Drawer

How to reproduce

  1. Implement a form page inside a drawer using ShadCN.
  2. Set the drawer to open and focus on an input field when a button is clicked.
  3. Test the behavior on Android and iOS devices (Safari).

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

ios devices(mobile)

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@mohanvgts mohanvgts added the bug Something isn't working label Oct 9, 2024
@Junk-debug
Copy link

im also having this issue

@Junk-debug
Copy link

Junk-debug commented Nov 19, 2024

@mohanvgts
Setting repositionInputs={false} on the root Drawer component worked for me.
I'm not sure if this behavior is exactly what you need, though.

Simulator.Screen.Recording.-.iPhone.16.Plus.-.2024-11-19.at.14.03.13.mp4

also this is an xcode ios simulation and i have not tested it on real iphone yet

@Junk-debug
Copy link

Junk-debug commented Nov 19, 2024

upd: this works on real iphone too

@jzstern
Copy link

jzstern commented Feb 3, 2025

@mohanvgts Setting repositionInputs={false} on the root Drawer component worked for me. I'm not sure if this behavior is exactly what you need, though.

Simulator.Screen.Recording.-.iPhone.16.Plus.-.2024-11-19.at.14.03.13.mp4
also this is an xcode ios simulation and i have not tested it on real iphone yet

this fixed it for me as well, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants