diff --git a/packages/react-components/src/InputNumber.tsx b/packages/react-components/src/InputNumber.tsx index fc94aff48f..de6ec71015 100644 --- a/packages/react-components/src/InputNumber.tsx +++ b/packages/react-components/src/InputNumber.tsx @@ -243,7 +243,10 @@ function InputNumber ({ autoFocus, bitLength = DEFAULT_BITLENGTH, children, clas [_onChangeWithSi, value] ); - const maxValueLength = getGlobalMaxValue(bitLength).toString().length - 1; + // Same as the number of digits, which means it can still overflow, i.e. + // for u8 we allow 3, which could be 999 (however 2 digits will limit to only 99, + // so this is more-or-less the lesser of evils without a max-value check) + const maxValueLength = getGlobalMaxValue(bitLength).toString().length; return (