Skip to content

Commit a5d8f59

Browse files
committed
Fix for input highlight when switching to Number type
1 parent 213a9c7 commit a5d8f59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ValueNodes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const NumberValue: React.FC<InputProps & { value: number }> = ({
9595
value={value}
9696
onChange={(e) => setValue(validateNumber(e.target.value))}
9797
autoFocus
98-
onFocus={(e) => e.target.select()}
98+
onFocus={(e) => setTimeout(() => e.target.select(), 10)}
9999
onKeyDown={(e) =>
100100
handleKeyboard(e, {
101101
numberConfirm: handleEdit,

0 commit comments

Comments
 (0)