eknows / Bootstrap-off-canvas-push

Bootstrap navigation hack for push style off canvas menu.
MIT License
6 stars 2 forks source link

Touch device issues #1

Open djmtype opened 8 years ago

djmtype commented 8 years ago

So far this has been the best Bootstrap offcanvas menu I've tried for my personal needs.

Opening the menu works great. Closing the menu on iOS Safari and Chrome, the menu animates … well, the opposite of smooth.

The iOS simulator replicates the issue well. https://cloudup.com/cgXhkhM_zVv

Changing .row-offcanvas-left.active to left: 0; for now doesn't solve the issue, but at least it helps. Instead of pushing off the main content container, the menu overlays.

Bootstrap's dropdown menus within this offcanvas menu don't work either since any tap or click ends up closing the main menu.

djmtype commented 8 years ago

In order to get dropdowns to work, changing: $('.navbar .nav a').click(function () { to $('.navbar .nav a:not(".dropdown-toggle")').click(function () { does the trick.

djmtype commented 8 years ago

I also imagine if you wanted a fixed positioned navbar, you can just set the viewport height.

.navbar .container>.navbar-collapse, 
.navbar .container>.navbar-collapse.active { 
min-height: 100vh; 
}
eknows commented 8 years ago

Thanks for your feedback, i will update the menu soon.