react-native-otp-inputs
react-native-otp-inputs copied to clipboard
The cursor focus in the input field is behaving abnormally.
When entering text during an abnormal situation, the cursor jumps between the first and second positions. Testing reveals that this is due to the cursor being inverted. If you start typing from the end, it behaves like typing normally from the first position. However, if you type from the beginning, it seems to treat it as jumping back to the end, returning to its original position.
My version and code are as follows: "react-native-otp-inputs": "^7.4.0",
<OtpInputs
ref={this.otpRef}
handleChange={handleTextChange}
keyboardType={keyboardType}
numberOfInputs={inputCount}
selectTextOnFocus={true}
style={[styles.container, containerStyle]}
inputStyles={[styles.textInput, textInputStyle]}
selectionColor={tintColor}
focusStyles={{ borderColor: tintColor ?? CommonStyle.color.textBlueColor }}
inputContainerStyles={[styles.inputContainer, { borderColor: offTintColor }]}
/>
https://github.com/user-attachments/assets/65b89e77-ebde-474d-bf46-23faa3fc8faa