Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable spellcheck for OTP input to prevent unwanted spelling error visuals #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kivvvvv
Copy link

@kivvvvv kivvvvv commented Jan 21, 2025

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

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

spellcheck.false.mp4

Copy link

vercel bot commented Jan 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rodz-input-otp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 21, 2025 3:27pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant