scrolling when sideNav open
See in this copy of the angular material website sideNav codepen demo:
http://codepen.io/anon/pen/ZbZyZN
- Open the right sideNav
- Scroll down
Result: You see the backdrop and the right sidenav scrolling up Expected: nothing should scroll
Note: removing the height: 500px; on the body hides the issue
The workaround I have been using:
md-backdrop, md-sidenav {
position: fixed;
}
Hey, This issue isn't happening to me. What Browser are you using?
Tested on chrome, safari, ff. But you have to make the height of the window smaller if it does not occur (there must be an overflowing element to scroll to).

@EladBezalel Should we completely disable scrolling for the whole document? Or is it by intention to disable scrolling only on the parent?
@DevVersion is this related to #5887?
@EladBezalel No I don't think so, my PR is just moving the sidenav down, if we are scrolled down on opening sidenav. So this seems to be another issue.
@DevVersion for your question the scroll lock should listen to viewport changes and repaint itself. we don't want to force the scroll lock on the body.
@EladBezalel - I'm sorry I talked about the other issue #5887. I meant only, that this issue isn't related to #5887.
@DevVersion i've talked about your earlier comment :)
@EladBezalel @standup75 This is not directly a bug and there should be not expectation to be not allowed to scroll. As the fixed height is applied to the second parent of the actual sidenav (parent > parent > sidenav), the sidenav will only disable scrolling for the first parent, so the second parent is able to scroll. That's the expected behaviour. So at this point, everything works as it should. Except that the backdrop should fill the complete parent, because the body isn't locked.
That's how the backdrop should actually look.

@DevVersion @EladBezalel As best as I can see from https://www.google.com/design/spec/patterns/navigation-drawer.html#navigation-drawer-content, the content that is covered by a "darkened scrim" should not scroll; only the navigation drawer if it's contents are larger than the screen height.
@DevVersion Do you see something in the spec which suggests you can scroll a "darkened scrim"? Usually, the point of having the darker backdrop is to inform the user that you cannot interact with that portion of the page. In this sense, the temporary right sidenav is acting similarly to a dialog.
@topherfangio Sorry I explained my thoughts a bit wrong.
- I mean currently the sidenav will disable scrolling on the parent (
disableParentScrolling)
And that works fine, but in this case / issue, there is the height of the second parent set to a fixed height.
parent(height="10000px";#first-parent)
parent(#sidenavs-parent)
md-backdrop(#from-the-sidenav)
md-sidenav
So the normal parent (#sidenavs-parent) will be disabled for scrolling (that should work, as you can see in other demos) - but now we can still scroll the first parent (#first-parent), which is by intention (because we don't disable the whole body for scrolling) - So that issue is obviously not a bug.
So now I think in general the backdrop should fill its parent height
- Currently the sidenavs backdrop is just filling the viewport with an absolute positon
- But I suggest, that the backdrop should fill with its parent height
So the backdrops height should be set to its parents height, when the body isn't disabled for scrolling.
Hi , I am new to Angular material. I am currently facing this scroll down issue. When i used position:fixed, it worked in laptops and but didnt worked in larger screens.
Can anyone suggest me a solution please? thanks Ela
.mat-drawer {
position: fixed !important;
}
That's what I use in my app
~~this is still an issue with 7.2.0~~
Edit: I was wrong. My issue was that it was scrolling down to <a> tags. If I place tabindex="-1" the issue goes away.