Skip to content
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

Bug Report: Drawer behaves inconsistently on Chrome for iOS #510

Open
mannoeu opened this issue Nov 13, 2024 · 6 comments
Open

Bug Report: Drawer behaves inconsistently on Chrome for iOS #510

mannoeu opened this issue Nov 13, 2024 · 6 comments

Comments

@mannoeu
Copy link

mannoeu commented Nov 13, 2024

Description:

When using the Drawer component from the vaul library, it behaves unexpectedly on Chrome for iOS devices. The same drawer works perfectly fine on Safari for iOS. The issue seems to be specific to Chrome, as inputs and other interactive elements inside the drawer either don't respond correctly or cause layout shifts.

iPhone.15.v17.6.-.Google.Chrome.2024-11-12.21-23-07.mp4

Expected Behavior:

The Drawer should function consistently across different browsers on iOS, including Chrome, just as it does on Safari. Inputs should be fully functional, and the drawer should maintain its layout without any strange behavior.

Current Behavior:

On Chrome for iOS, focusing on inputs inside the drawer causes unexpected scrolling or layout issues.
The drawer sometimes shifts position, becomes unresponsive, or behaves inconsistently when interacting with form elements.

Environment:

Device: iPhone 11 and 14 (iOS 16 and 17)
Browser: Chrome for iOS (92.0.4515.90 and 131.0.6778.73)
vaul Version: ^1.1.1
React Version: ^18.3.1

Steps to Reproduce:

Open the Chrome browser on an iPhone.
Navigate to a page that uses the Drawer component.
Drawer should be contain one Input/button.
Open the drawer and try interacting with any inputs inside it.
Observe the unexpected behavior.

Additional Context:

The issue does not occur on Safari for iOS, where the drawer and its contents work as expected. This suggests that it might be a Chrome-specific compatibility issue related to how it handles inputs within fixed elements.

When the input contains the defined inputMode attribute, this does not happen

Would appreciate any guidance or fixes for this issue. Thank you!

@dnntung
Copy link

dnntung commented Nov 15, 2024

Same here, but on safari (iOS 17.5.1)

@gonzalochale
Copy link

Any updates?

@Junk-debug
Copy link

try setting repositionInputs={false} to the Drawer.Root this helped for me

@gonzalochale
Copy link

Yeah, I just tried it, and it fixed the misalignment in Chrome, thanks! It’s still not perfect in Safari, but I think I’ll stick with it for now while waiting for a proper fix.

@Junk-debug
Copy link

for me worked on safari too

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

this is an xcode ios simulation but on real iphone works too(tested)

@Junk-debug
Copy link

probably this is the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants