fixes #6353 - InputOtp: IntegerOnly mode accepts "space"

pull/6355/head
mergehez 2024-09-06 23:57:23 +02:00
parent 3564633889
commit e72583d658
1 changed files with 1 additions and 1 deletions

View File

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