Skip to content

Prevent page from scrolling while sidenav is open #332

@rsnider19

Description

@rsnider19

Note: for support questions, please use one of these channels:
https://github.com/angular/material2/blob/master/CONTRIBUTING.md#question.
This repository's issues are reserved for feature requests and bug reports.

  • Do you want to request a feature or report a bug?
    Feature
  • What is the current behavior?
    When the sidenav is open in any mode, it scrolls with the page.
  • If the current behavior is a bug,
    please provide steps to reproduce and if possible a minimal demo of the problem

    via https://plnkr.co or similar.
  • What is the expected behavior?
    I would expect the sidenav to either scroll on it's own, or to not scroll at all.
  • What is the motivation / use case for changing the behavior?
    When your page is overflowing vertically, it looks bad if the user were to accidentally scroll while the sidenav is open.
  • Which version of Angular and Material, and which browser and OS does this issue affect?
    Did this work in previous versions of Angular / Material?
    Please also test with the latest stable and snapshot versions.
    Angular - 2.0.0-beta.14
    Material - 2.0.0-alpha.2
  • Other information
    (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix)
    I just noticed that when you remove the transform and -webkit-transform from md-sidenav-layout and md-sidenav-layout > md-content it works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions