fix(input-otp): improve autofill detection and invalid character handling#30541
Merged
brandyscarney merged 5 commits intomainfrom Jul 11, 2025
Merged
fix(input-otp): improve autofill detection and invalid character handling#30541brandyscarney merged 5 commits intomainfrom
brandyscarney merged 5 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ShaneK
approved these changes
Jul 11, 2025
Member
ShaneK
left a comment
There was a problem hiding this comment.
Solid improvement, great work!
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.
Issue number: resolves #30459
What is the current behavior?
Typing
"12345"in a 4-box input-otp withtype="text"is incorrectly triggering autofill detection on Android, causing"45"to be distributed across the first two boxes instead of replacing the"4"with the"5".Current Behavior: Type
"12345"→["4", "5", "", ""](incorrectly distributed)Expected Behavior: Type
"12345"→["1", "2", "3", "5"](correctly replaces last character)Typing an invalid character (like
"w"whentype="number") in an input box with a value is inserted, ignoring the input validation.Current Behavior: Type
"2"in the first box, focus it again, type"w"→"2w"appearsExpected Behavior: Type
"2"in the first box, focus it again, type"w"→"2"remains (invalid character rejected)What is the new behavior?
Does this introduce a breaking change?
Other information
Dev build:
8.6.5-dev.11752245814.1253279a