Skip to content

Commit

Permalink
Fixed #5635 - InputOp: Digits only doesn't work on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Apr 24, 2024
1 parent 76c0c37 commit 6004166
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/inputotp/InputOtp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default {
break;
default:
if ((this.integerOnly && !((event.code.startsWith('Digit') || event.code.startsWith('Numpad')) && Number(event.key) >= 0 && Number(event.key) <= 9)) || (this.tokens.join('').length >= this.length && event.code !== 'Delete')) {
if ((this.integerOnly && !(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 6004166

Please sign in to comment.