Disable spellcheck for OTP input to prevent unwanted spelling error visuals #82
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 hide the real behind the scene for styling purposes, hence the visual is placed there.) 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