From 6004166df9eaf3d27d3df021b99f6c1ab28408ab Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Wed, 24 Apr 2024 09:34:19 +0300 Subject: [PATCH] Fixed #5635 - InputOp: Digits only doesn't work on mobile --- components/lib/inputotp/InputOtp.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/inputotp/InputOtp.vue b/components/lib/inputotp/InputOtp.vue index ec670ed1a..342ca421b 100755 --- a/components/lib/inputotp/InputOtp.vue +++ b/components/lib/inputotp/InputOtp.vue @@ -157,7 +157,7 @@ export default { break; default: - if ((this.integerOnly && !((event.code.startsWith('Digit') || event.code.startsWith('Numpad')) && Number(event.key) >= 0 && Number(event.key) <= 9)) || (this.tokens.join('').length >= this.length && event.code !== 'Delete')) { + if ((this.integerOnly && !(Number(event.key) >= 0 && Number(event.key) <= 9)) || (this.tokens.join('').length >= this.length && event.code !== 'Delete')) { event.preventDefault(); }