Skip to content

Commit

Permalink
side nav mobile scrolling partial fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Dogfalo committed Jan 8, 2015
1 parent 73a41f5 commit bec7913
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/materialize.css
Original file line number Diff line number Diff line change
Expand Up @@ -6346,7 +6346,7 @@ ul.side-nav.fixed {
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
height: 120vh;
background-color: rgba(0, 0, 0, 0.5);
z-index: 998;
will-change: opacity; }
Expand Down
4 changes: 2 additions & 2 deletions bin/materialize.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/ghpages-materialize.css
Original file line number Diff line number Diff line change
Expand Up @@ -6346,7 +6346,7 @@ ul.side-nav.fixed {
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
height: 120vh;
background-color: rgba(0, 0, 0, 0.5);
z-index: 998;
will-change: opacity; }
Expand Down
3 changes: 3 additions & 0 deletions js/sideNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@
}
window.onmousewheel = document.onmousewheel = wheel;
document.onkeydown = keydown;
$('body').css({'overflow-y' : 'hidden'});
}

function enable_scroll() {
if (window.removeEventListener) {
window.removeEventListener('DOMMouseScroll', wheel, false);
}
window.onmousewheel = document.onmousewheel = document.onkeydown = null;
$('body').css({'overflow-y' : ''});

}

$.fn.sideNav = function (options) {
Expand Down
3 changes: 2 additions & 1 deletion sass/components/_sideNav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ ul.side-nav.fixed {
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;

height: 120vh;
background-color: rgba(0,0,0,.5);
z-index: 998;

Expand Down

0 comments on commit bec7913

Please sign in to comment.