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