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(); }