question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

#sidenav-overlay stays active after sideNav('hide')

See original GitHub issue

I’m using the SideNav for the collapsible menu in mobile:

$(".button-collapse").sideNav();
$('.collapsible').collapsible();
$('.button-collapse').sideNav({
    closeOnClick: true
});

The problem is, sometimes, when it hides after a touch on a menu item, the #sidenav-overlay does not go away unless I touch the html element.

I’m not good at jQuery but it looks like the closeOnClick does not hide the #sidenav-overlay.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:25 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
ktemocommented, Jun 24, 2016

@justsayno I did something a little nasty to fix it:

$('div[id^=sidenav-overlay]').remove();

4reactions
eladolocommented, Dec 23, 2016

The problem it´s that your are calling more than once the sideBar method. You can fix it like this:

$(".button-collapse").off("click").sideNav();

The .off("click") will clean the events added for that element an will append the sidebar method only.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Materialize CSS - Sidenav overlay covers all the page
I am not able to click the links in the sidenav since the sidenav-overlay covers all the page even the sidenav itself. It...
Read more >
4.4.3 side nav does not remove sidenav-overlay
I have updated to latest 4.4.3 as this is supposed to include improvements to the Side Nav. However, When I click on a...
Read more >
How To Create a Side Navigation Menu - W3Schools
Sidenav overlay without animation ... Add all page content inside this div if you want the side nav to push page ... position:...
Read more >
Sidenav - Materialize
Fixed HTML Structure ... Add the class sidenav-fixed to have the sidenav be fixed and open on large screens and hides to the...
Read more >
Adjust your sidebar preferences - Slack
Click More to see any hidden options. Choose which conversations to show. By default, your sidebar will show all the channels you've joined...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found