From 681944080c81fd541b24a1306178788931476034 Mon Sep 17 00:00:00 2001 From: Szobonya Csaba Date: Fri, 12 Apr 2024 14:54:01 +0200 Subject: [PATCH] fix(#5577): Use event.key instead of event.code for determining digits --- components/lib/inputnumber/InputNumber.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/inputnumber/InputNumber.vue b/components/lib/inputnumber/InputNumber.vue index f0ec6d5c9..dafc1f360 100755 --- a/components/lib/inputnumber/InputNumber.vue +++ b/components/lib/inputnumber/InputNumber.vue @@ -535,7 +535,7 @@ export default { const isDecimalSign = this.isDecimalSign(char); const isMinusSign = this.isMinusSign(char); - if (((event.code.startsWith('Digit') || event.code.startsWith('Numpad')) && Number(char) >= 0 && Number(char) <= 9) || isMinusSign || isDecimalSign) { + if (['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'].includes(char) || isMinusSign || isDecimalSign) { this.insert(event, char, { isDecimalSign, isMinusSign }); }