Skip to content

Commit

Permalink
Fix primefaces#6727: InputNumber keydown bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Jun 5, 2024
1 parent 4706144 commit bbe9c9c
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 bbe9c9c

Please sign in to comment.