From b0198a59db6e6e86e09f81d992cadfc21eb8f6a5 Mon Sep 17 00:00:00 2001 From: Melloware Date: Wed, 5 Jun 2024 07:50:59 -0400 Subject: [PATCH] Fix #6727: InputNumber keydown bugfix (#6728) --- components/lib/inputnumber/InputNumber.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/inputnumber/InputNumber.js b/components/lib/inputnumber/InputNumber.js index 91ed25eafd..a6e10423bb 100644 --- a/components/lib/inputnumber/InputNumber.js +++ b/components/lib/inputnumber/InputNumber.js @@ -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 }); } }