input-otp
input-otp copied to clipboard
[BUG] autoFocus not triggering keyboard on iOS devices
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
- Create a new project using the input-otp library
- Implement the OTPInput component with the autoFocus prop set to true
- Run the project on an iOS device (either in a web browser or as a native app)
- Observe the behavior when the OTPInput component is rendered
I've created a CodeSandbox to demonstrate this issue