|
|
@ -306,7 +306,7 @@ let onFirstMount = () => { |
|
|
|
//console.log('keypress', this.value);
|
|
|
|
//console.log('keypress', this.value);
|
|
|
|
if(!btnNext.style.visibility &&/* this.value.length >= 9 && */ e.key === 'Enter') { |
|
|
|
if(!btnNext.style.visibility &&/* this.value.length >= 9 && */ e.key === 'Enter') { |
|
|
|
return onSubmit(); |
|
|
|
return onSubmit(); |
|
|
|
} else if(/\D/.test(e.key) && !(e.metaKey || e.ctrlKey) && !(e.key === '+' && e.shiftKey/* && !this.value */)) { |
|
|
|
} else if(/\D/.test(e.key) && !(e.metaKey || e.ctrlKey) && e.key !== 'Backspace' && !(e.key === '+' && e.shiftKey/* && !this.value */)) { |
|
|
|
e.preventDefault(); |
|
|
|
e.preventDefault(); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|