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] autoFocus not triggering keyboard on iOS devices #61

Open
MorganMeirFitussi opened this issue Aug 14, 2024 · 1 comment
Open

[BUG] autoFocus not triggering keyboard on iOS devices #61

MorganMeirFitussi opened this issue Aug 14, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@MorganMeirFitussi
Copy link

Version of the library: 1.2.4

Expected Behavior

When the OTPInput component is rendered with autoFocus, the first slot should be focused, and the keyboard should automatically appear on iOS devices.

Current Behavior

When using the OTPInput component with the autoFocus prop set to true, the first slot is correctly focused on iOS devices (both web and native), but the keyboard does not automatically appear. Users must tap on the focused slot to make the keyboard appear.

Steps to Reproduce

  1. Create a new project using the input-otp library
  2. Implement the OTPInput component with the autoFocus prop set to true
  3. Run the project on an iOS device (either in a web browser or as a native app)
  4. Observe the behavior when the OTPInput component is rendered

I've created a CodeSandbox to demonstrate this issue

@MorganMeirFitussi MorganMeirFitussi added the bug Something isn't working label Aug 14, 2024
@ETOPS7
Copy link

ETOPS7 commented Aug 16, 2024

I also noticed this problem today on iOS devices
Works on android
Testing on browserstack.com

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