Skip to content

Commit

Permalink
Fix #6727: InputNumber keydown bugfix (#6728)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Jun 5, 2024
1 parent 4706144 commit b0198a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/inputnumber/InputNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ export const InputNumber = React.memo(
const _isDecimalSign = isDecimalSign(char);
const _isMinusSign = isMinusSign(char);

if ((event.code && (event.code.startsWith('Digit') || event.code.startsWith('Numpad')) && Number(char) >= 0 && Number(char) <= 9) || _isMinusSign || _isDecimalSign) {
if ((Number(char) >= 0 && Number(char) <= 9) || _isMinusSign || _isDecimalSign) {
insert(event, char, { isDecimalSign: _isDecimalSign, isMinusSign: _isMinusSign });
}
}
Expand Down

0 comments on commit b0198a5

Please sign in to comment.