r5n-dev/react-native-otp-inputs

When editing the OTP, cursor does not move to the next input box if the edited value is the same as the old value

Closed this issue · 3 comments

When user changes the value in the OTP input, if the changed value is the same as the old one, the cursor will stay in that box and not move to the next one.
image

@dsznajder Thank you so much for the prompt fixes. The non-editable pasted value bug was a blocker for me. However, this issue still exists.

In this screenshot, I entered 5 in the second box. When I select that box again and press 5, the cursor stays in that box, after the 5, and does not move to the third box.
image

I tested using version 4.0.0-alpha.1

@quanle1994 Yes, the problem is that onKeyPress event is not triggered properly on android when keyboard is not default. I have an idea to resolve this properly but it will need native package. I will do it and test the next version. If everything will be fine, we will introduce the new version with guide how to setup.
Android issue

@quanle1994 Now it's available through react-native-otp-inputs@next. Check migration guide :)