react-native-otp-inputs icon indicating copy to clipboard operation
react-native-otp-inputs copied to clipboard

The cursor focus in the input field is behaving abnormally.

Open DayDayHappy666 opened this issue 9 months ago • 0 comments

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

DayDayHappy666 avatar Feb 21 '25 02:02 DayDayHappy666