[FF64] Fix Backspace in phone number input

This commit is contained in:
Eduard Kuzmenko 2021-06-09 15:21:18 +03:00
parent ebbc4a2eb0
commit d203337cb7

View File

@ -306,7 +306,7 @@ let onFirstMount = () => {
//console.log('keypress', this.value);
if(!btnNext.style.visibility &&/* this.value.length >= 9 && */ e.key === 'Enter') {
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();
return false;
}