Skip to content

Commit

Permalink
chore(input): always focus onContainerClick
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermerodz committed Feb 19, 2024
1 parent cd79dc2 commit 1ebd5dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export const OTPInput = React.forwardRef<HTMLInputElement, OTPInputProps>(

function onContainerClick(e: React.MouseEvent<HTMLInputElement>) {
e.preventDefault()
if (!inputRef.current || document.activeElement === inputRef.current) {
if (!inputRef.current) {
return
}
inputRef.current.focus()
Expand Down

0 comments on commit 1ebd5dc

Please sign in to comment.