react-otp-input
react-otp-input copied to clipboard
Keyboard layout auto switches from numbers to characters in mobiles.
When we try to enter the OTP in mobiles. The keyboard layout auto switches from Number to Characters/Alphabets layout because the OTP component re-renders on every input.
The above issue can be reproduced on the official demo link. i.e https://devfolioco.github.io/react-otp-input/
Steps to reproduce:
- Open the link in mobile phone.
- Switch to number keyboard.
- Add a number
- The keyboard will switch back to characters/alphabets keyboard layout
Preferred Solution
- The keyboard layout state should persist.
Please check the following clip: https://www.loom.com/share/eadc9d07d36a4211b758464a356bc6ba
-
Reproduced on:
- Phone: Nokia 6.1 plus
- OS: Android 10
-
Also reproducible on iOS 15.2
use attribute isInputNum={true}
https://devfolioco.github.io/react-otp-input/
The OTP has both alphabets and numbers. So can't fix it to just numbers.
You can now customize the type with the inputType
prop in v3.
does anyone resolved this?