-
Notifications
You must be signed in to change notification settings - Fork 6.8k
After upgrade MatSidenav does not set margin-left anymore (mode side) #7682
Description
Bug, feature request, or proposal:
After upgrade to 2.0.0-beta.12 MatSidenav does not set margin-left anymore (mode side). The Sidenav does then overlap the content.
What is the expected behavior?
Sidenav does not overlap the content in case of mode side.
What is the current behavior?
In our case the mat-sidenav-container is located inside a component which is loaded by the router. When loading the route which contains the Sidenav directly, the Sidenav overlaps the content. When loading a different route and then navigating to the route containing the Sidenav, the Sidenav sets the margin as expected and does not overlap the content.
It looks like a timing issue and that _updateContentMargins does not get called. https://github.com/angular/material2/blob/7fe1b81a47b6de036ae85c183328400e45c40b15/src/lib/sidenav/drawer.ts#L569
After a reload it overlaps again.
@jelbourn any ideas? Thx!
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 4.4.4
Material 2.0.0-beta.12