pull/5414/head
tugcekucukoglu 2024-03-13 15:51:15 +03:00
parent 6802912517
commit 65b160d8ff
1 changed files with 1 additions and 11 deletions

View File

@ -130,12 +130,6 @@ export default {
}, },
onKeyDown(event) { onKeyDown(event) {
const newValue = this.tokens.join(''); const newValue = this.tokens.join('');
let limitReached = false;
if (newValue.length >= this.length) {
limitReached = true;
}
const keyCode = event.keyCode; const keyCode = event.keyCode;
switch (keyCode) { switch (keyCode) {
@ -171,11 +165,7 @@ export default {
break; break;
default: default:
if (this.integerOnly && !(event.keyCode >= 48 && event.keyCode <= 57)) { if ((this.integerOnly && !(event.keyCode >= 48 && event.keyCode <= 57)) || (this.tokens.join('').length >= this.length && event.keyCode != 46)) {
event.preventDefault();
}
if (limitReached && event.keyCode != 46) {
event.preventDefault(); event.preventDefault();
} }