Merge pull request #6355 from mergehez/input-otp-integer-only-space-problem

fixes #6353 - InputOtp: IntegerOnly mode accepts "space"
pull/6378/head
Tuğçe Küçükoğlu 2024-09-10 14:19:21 +03:00 committed by GitHub
commit 5f61a7dad1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ export default {
break; break;
default: 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(); event.preventDefault();
} }