Skip to content

Commit

Permalink
fix: disable spellcheck on OTP input to remove unwanted spelling erro…
Browse files Browse the repository at this point in the history
…r visuals
  • Loading branch information
kivvvvv committed Jan 21, 2025
1 parent fcf30b7 commit 150f6b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/input-otp/src/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export const OTPInput = React.forwardRef<HTMLInputElement, OTPInputProps>(
if (!pasteTransformer && (!initialLoadRef.current.isIOS || !e.clipboardData || !input)) {
return
}

const _content = e.clipboardData.getData('text/plain')
const content = pasteTransformer
? pasteTransformer(_content)
Expand Down Expand Up @@ -422,6 +422,7 @@ export const OTPInput = React.forwardRef<HTMLInputElement, OTPInputProps>(
maxLength={maxLength}
value={value}
ref={inputRef}
spellCheck={false}
onPaste={e => {
_pasteListener(e)
props.onPaste?.(e)
Expand Down

0 comments on commit 150f6b8

Please sign in to comment.