Answer the question
In order to leave comments, you need to log in
How to disable the default event for the Enter key on Android?
I have a form
<form action="#" class="form">
<input class="form__input" type="text" name="name" required>
<input class="form__input" type="tel" name="tel" required>
<button class="form__button" type="submit">Submit</button>
</form>
$('.form .form__input').keydown(function (event) {
if (event.keyCode == 13) {
event.preventDefault();
$(this).blur();
return false;
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question