Disable spellcheck for OTP input to prevent unwanted spelling error visuals#82
Open
kivvvvv wants to merge 2 commits into
Open
Disable spellcheck for OTP input to prevent unwanted spelling error visuals#82kivvvvv wants to merge 2 commits into
kivvvvv wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
leducmaxime
approved these changes
May 13, 2025
Closed
Owner
|
I agree spellcheck is not necessary for input-otp's UX. I'll make time to review this and we'll make further adjustments for the sake of DX, but the proposal is great! Thanks |
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.
When the OTP is not clear immediately after fulfilling it and the OTP input allows characters, those characters are subject to be spellchecked by the browser. Hence when the input has any spelling errors, the browser display a visual suggesting that there are some spelling errors, in this case, it looks like a red dotted underline as seen below:

spellcheck.true.mp4
According to MDN spellcheck, this property controls the behavior.
I don't think the spellchecking behavior is necessary for OTP input. Also the position is off, which could be misleading. (I know that it is necessary to visually hide the real input behind the scene for styling purposes, hence the visual for spelling error is misplaced.) For those reasons, I think it should be turn off.
So, this is when there is no spellchecking on the input,

spellCheck={false}.spellcheck.false.mp4