Skip to content

Commit

Permalink
Merge pull request #6355 from mergehez/input-otp-integer-only-space-p…
Browse files Browse the repository at this point in the history
…roblem

fixes #6353 - InputOtp: IntegerOnly mode accepts "space"
  • Loading branch information
tugcekucukoglu authored Sep 10, 2024
2 parents ba744ca + e72583d commit 5f61a7d
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 5f61a7d

Please sign in to comment.