react-native-otp-textinput
react-native-otp-textinput copied to clipboard
Weird behaviour when autofocus is set to true
Hello,
Thank you for making this module it's really great and simple to use. I have a slight problem when the autofocus property is set on OTPTextView like this:
<OTPTextView ref={(e) => (this.codeInput = e)} containerStyle={{ width: "100%", height: 65, paddingHorizontal: 10, }} autoFocus={true} handleTextChange={(code) => this.onOtpCodeChange(code)} inputCount={6} keyboardType={"phone-pad"} tintColor={"#A65FDB"} />
When running the app the keyboard is displayed when autoFocus is set to true, but the cursor keeps moving from 1 box to another for a period of time then goes back to the first box.
I checked the documentation and I couldn't find the autoFocus property. Is there a way I can implement this ?
Hey, may I know which platform this issue is occurring whether in Android or iOS ? Also will it be possible for you to share a screen capture of the issue so that I may understand it more clearly ?
same issue here ..... platform - android
Yes on Android only
This fix implement in this PR #16 has fixed the issue. You can explicitly pass autoFocus
and it will only trigger focus for the first text field. Closing this now since there is not activity on this issue.