Skip to content

Commit

Permalink
fixes primefaces#6353 - InputOtp: IntegerOnly mode accepts "space"
Browse files Browse the repository at this point in the history
  • Loading branch information
mergehez committed Sep 6, 2024
1 parent 3564633 commit e72583d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/primevue/src/inputotp/InputOtp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit e72583d

Please sign in to comment.