From e72583d658e56ef8c585f515b005f2318f99d50d Mon Sep 17 00:00:00 2001 From: mergehez Date: Fri, 6 Sep 2024 23:57:23 +0200 Subject: [PATCH] fixes #6353 - InputOtp: IntegerOnly mode accepts "space" --- packages/primevue/src/inputotp/InputOtp.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primevue/src/inputotp/InputOtp.vue b/packages/primevue/src/inputotp/InputOtp.vue index f0fb48eb2f..dc3ce81dcc 100755 --- a/packages/primevue/src/inputotp/InputOtp.vue +++ b/packages/primevue/src/inputotp/InputOtp.vue @@ -166,7 +166,7 @@ export default { break; default: - if ((this.integerOnly && !(Number(event.key) >= 0 && Number(event.key) <= 9)) || (this.tokens.join('').length >= this.length && event.code !== 'Delete')) { + if ((this.integerOnly && !(event.code !== 'Space' && Number(event.key) >= 0 && Number(event.key) <= 9)) || (this.tokens.join('').length >= this.length && event.code !== 'Delete')) { event.preventDefault(); }