This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 111
The offcanvas menu automatically closes when the input is clicked in mobile #57
Comments
I have the same issue too. |
I have too. It seems a resize event occurred when you clicked input on mobile device because of virtual keyboard. When resize event occurred, the opened menu closed automatically by purpose. If you do not want this, you can comment resize event handler in source code, i think. |
The resize event seems to be triggered on Android (not on iOS). A temporary fix would be to add an extra check in the resize handler. $(window).on('resize', function() {
if($(document.activeElement).attr('type') !== 'text') {
$('.navbar-offcanvas.in').each(function() {
return $(this).height('').removeClass('in');
});
return $('.offcanvas-toggle').removeClass('is-open');
}
}); |
I've same issue... my workaround is
|
salaros
added a commit
to salaros/Bootstrap-Offcanvas
that referenced
this issue
Jul 3, 2017
…input is clicked in mobile
|
Thanks @smokie it worked for me |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The offcanvas menu automatically closes when the input is clicked in mobile.when I click in input(in mobile),it trigger window resize and it close the menu .can you add option in tag (like data-recalc='true') and closing menu in resize when option recalc is true or false. thank you
The text was updated successfully, but these errors were encountered: