Repository navigation
fix: support OTP digit editing and resolve input regressions - #118
Open
Leolijiaming wants to merge 1 commit into
Open
Leolijiaming wants to merge 1 commit into
Leolijiaming wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OTP cells could not select individual digits, placeholder cells incorrectly received filled styles, and the blinking cursor did not stop its animation on cleanup. All cells also shared the same default test identifier.
This change keeps the existing single TextInput and adds measured cell hit testing and selection synchronization so tapping a filled cell selects that character for replacement. Multi-character input updates the caret after insertion and guards against a subsequent pre-edit selection event, addressing the reported partial-paste/backspace scenario. Clear and programmatic assignment reset selection consistently, and native callbacks remain available.
The patch also bases filled styling on actual input, stops blink loops on cleanup and duration changes, sets animations to non-interactive, and derives optional per-cell test/native IDs from the existing textInputProps identifiers while retaining legacy defaults.
Fixes #114
Fixes #109
Fixes #104
Related to #105 and #113; native-device acceptance is still pending.
Validation: