material icon indicating copy to clipboard operation
material copied to clipboard

sidenav not properly position fixed

Open box-as opened this issue 10 years ago • 4 comments

Hi all,

I am implementing the angular material design for my project and found that the position for sidenav is not fixed. If the page size is big and once sidenav is opened on scroll it moves up and not fixed to the position. Even the opacity overlay is not fixed.

You can check the below codepen open the sidenav and try scrolling downward.
CodePen: http://codepen.io/saurabhnsonar/pen/rerZzv/

box-as avatar Apr 27 '16 06:04 box-as

Hello,

I am facing the same issue. Stuck at this from 2 days, adding style="position: fixed;" to element solves the issue, but it creates problem at different screens, and with other page content.

Need Solution ASAP.

Thanks!

rahul-pxl avatar Apr 27 '16 06:04 rahul-pxl

Referencing #5861 as a previous issue with some information.

devversion avatar Apr 29 '16 14:04 devversion

@DevVersion @crisbeto

With the reference #5861 you mentioned, "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."

I got your point that way but what about the media below 'lg'? Try with the small screen even the second parent height do not match with the first parent height nor the backdrop. And still it do scroll giving the weird look to the web app.

In my case, I am using only one side nav at left. I do feel that it should be fixed and disable scroll of the parent on lower media scale i.e. below lg. So, that it can get a look like app "nav drawer" or whatever. As per current scenario, once we scroll the screen it just goes down till the sidenav ends and then it shows parent content as normal page which is quite annoying.

Sorry, for now I cannot disclose my work but to reproduce the issue what I mean, try opening the codepen http://codepen.io/saurabhnsonar/pen/rerZzv/ then change that to full screen and make your browser size responsive or toggle your browser to device mode and select any of the mobile device (if using chrome) or some scale lower than lg (mobile screen will be best to get the issue). Then open the left nav and then try scrolling the page below. I do appreciate your work and I feel the way you made for media side "lg" is just perfect but the screen below lg is what I feel the issue with. Hope you understand my point.

box-as avatar Apr 29 '16 17:04 box-as

This issue is closed as part of our ‘Surge Focus on Material 2' efforts. For details, see our forum posting @ http://bit.ly/1UhZyWs.

ThomasBurleson avatar Jun 02 '16 06:06 ThomasBurleson