Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mat-drawer-container triggers angular detection cycles on window:resize #18471

Closed
Ploppy3 opened this issue Feb 12, 2020 · 2 comments · Fixed by #15814
Closed

mat-drawer-container triggers angular detection cycles on window:resize #18471

Ploppy3 opened this issue Feb 12, 2020 · 2 comments · Fixed by #15814
Labels
area: material/sidenav P2 The issue is important to a large percentage of users, with a workaround

Comments

@Ploppy3
Copy link

Ploppy3 commented Feb 12, 2020

Reproduction

https://stackblitz.com/edit/angular-se13bg?file=src%2Fapp%2Fsidenav-drawer-overview-example.html

Steps to reproduce:

  1. <mat-drawer-container></mat-drawer-container>

Expected Behavior

mat-drawer-container should not trigger angular detection cycle when the window is resized

Actual Behavior

mat-drawer-container triggers angular detection cycles on window:resize

Environment

  • Angular: 9
  • CDK/Material: 9
@crisbeto
Copy link
Member

Sounds like it could be resolved by #15814 since the sidenav is set up to only trigger change detection if its margin has changed.

@mmalerba mmalerba added the needs triage This issue needs to be triaged by the team label May 20, 2020
crisbeto added a commit to crisbeto/material2 that referenced this issue Jul 19, 2020
Fixes the `resize` and `orientationchange` events of the `ViewportRuler` being run inside the `NgZone`, if the subscription comes from inside the zone.

Fixes angular#18471.
@crisbeto crisbeto added has pr P2 The issue is important to a large percentage of users, with a workaround and removed needs triage This issue needs to be triaged by the team labels Jul 19, 2020
wagnermaciel pushed a commit that referenced this issue Jul 21, 2020
Fixes the `resize` and `orientationchange` events of the `ViewportRuler` being run inside the `NgZone`, if the subscription comes from inside the zone.

Fixes #18471.
wagnermaciel pushed a commit that referenced this issue Jul 21, 2020
Fixes the `resize` and `orientationchange` events of the `ViewportRuler` being run inside the `NgZone`, if the subscription comes from inside the zone.

Fixes #18471.

(cherry picked from commit ea9293d)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 21, 2020
wagnermaciel pushed a commit to wagnermaciel/components that referenced this issue Jan 14, 2021
…15814)

Fixes the `resize` and `orientationchange` events of the `ViewportRuler` being run inside the `NgZone`, if the subscription comes from inside the zone.

Fixes angular#18471.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/sidenav P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants