I have a bottom fixed menu on my site and box with form. I already hide the menu when user is filling the form and keyboard is shown, but it doesn't work as I wish. When user is switching to to fill next input, the menu shows up for a second because of "blur", how to avoid this action?
Shorter version of my code:
$(".box").on('focus', 'input', function () {
$(".menu").css("bottom", -1 * $menuHeight);
});
$(".box").on('blur', 'input', function () {
$(".menu").css("bottom", 0);
});
Sample HTML:
<div class="box">
<input type="text" maxlength="100" class="custom-input">
<input type="text" maxlength="100" class="custom-input">
<input type="text" maxlength="100" class="custom-input">
</div>
<div class="menu" style="position:fixed; display:flex; bottom:0; left:0; right:0; ">
menuHTML
</div>