Jasny bootstrap offcanvas doesn't scroll on phones

I created a sidebar using the jasny bootstrap add-on. The markup is pretty simple:

 <div class="navmenu navmenu-inverse navmenu-fixed-right offcanvas-sm sidemenu"> <ul class="nav navmenu-nav> <li></li> <!-- many more <li> which may have <ul> nested --> </ul> </div> 

The fact is that it does not scroll on phones. When I try to scroll it, it just doesn't work.

I tried to test it using iOS Simulator using a web inspector and try to bind some events. I tried to bind the scroll event to .sidemenu , but this event never fired. Then I tried to bind the touchstart event, and it worked as expected. I suppose this means that it recognizes my touch, but it just does not recognize the scroll gesture?

Any idea why it doesn't work?

+7
javascript jquery css twitter-bootstrap jasny-bootstrap
source share
2 answers

Try adding data placement = "right" to the toggle button, this will solve the problem for me.

 <type="button" class="navbar-toggle" data-toggle="offcanvas" data-target="#menucanvas" data-placement="right"> 
0
source share

I edited jasny-bootstrap.js line 106 and changed this:

 OffCanvas.DEFAULTS = { toggle: true, placement: 'auto', autohide: true, recalc: true, disableScrolling: false, /*true*/ modal: false 

}

It worked for me.

0
source share

All Articles