Skip to content

MatSideNav autosize runs into ngZone 100% CPU #11215

@Ploppy3

Description

@Ploppy3

Bug, feature request, or proposal:

Bug: regression
MatSideNav autosize runs into ngZone

What is the expected behavior?

autosize code should run outside ngZone

What is the current behavior?

autosize code runs inside ngZone

What are the steps to reproduce?

<mat-sidenav-container autosize>
  <mat-sidenav [opened]="isSidenavOpened" [mode]="'side'"></mat-sidenav>
</mat-sidenav-container>

https://stackblitz.com/edit/angular-material2-issue-fn9sts?file=app/app.component.html

What is the use-case or motivation for changing an existing behavior?

It pushes CPUs to their limit, 100% constant usage.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular CLI: 6.0.0
Node: 8.9.4
OS: win32 x64
Angular: 6.0.0
Material: 6.0.1

Is there anything else we should know?

Does not happen unless this code is present
[opened]="isSidenavOpened" [mode]="'side'"

Metadata

Metadata

Assignees

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

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions