Skip to content

Commit 44914eb

Browse files
Update src/InputNumber.tsx
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 96898fe commit 44914eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/InputNumber.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ const InputNumber = React.forwardRef<InputNumberRef, InputNumberProps>((props, r
596596

597597
// >>> Mouse events
598598
const onInternalMouseDown: React.MouseEventHandler<HTMLDivElement> = (event) => {
599-
if (event.target !== inputRef.current) {
599+
if (inputRef.current && event.target !== inputRef.current) {
600600
inputRef.current.focus();
601601
}
602602

0 commit comments

Comments
 (0)