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

Animations with HostBinding used within Sidenav. Leaks detached DOM nodes #15225

Open
FionaTreveil opened this issue Feb 18, 2019 · 2 comments
Open
Labels
area: material/sidenav help wanted The team would appreciate a PR from the community to address this issue P2 The issue is important to a large percentage of users, with a workaround perf This issue is related to performance

Comments

@FionaTreveil
Copy link

All DOM elements should be removed when the sidenav is removed

DOM elements relating to TransitionAnimation and all sub-nodes remain as detached

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-qnd8ry?file=app%2Ftwo.ts
click between links one and two leaves all elements on the page in memory as detached HTML elements

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

Using Chrome and Firefox with Angular animations 7.2.4 and Angular material 7.3.1

Is there anything else we should know?

Similar to closed bugs 18606 and 8862 which are both marked as fixed.
The mat-drawer code is including an animation trigger with HostBinding.
When the drawer is destroyed, the animation information is not released, leaving references to playersByElement/statesByElement in TransitionAnimationEngine. The result is that all of the nodes within the drawer are left as detached elements when the sidenav is removed.

@jelbourn
Copy link
Member

Potentially related to #15322

@jelbourn jelbourn added help wanted The team would appreciate a PR from the community to address this issue P2 The issue is important to a large percentage of users, with a workaround perf This issue is related to performance labels May 12, 2019
@TrevorBroderick1
Copy link

Is there any workaround known for this issue? It does not appear to have been fixed with #15322 as I'm still seeing it in Angular 14.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/sidenav help wanted The team would appreciate a PR from the community to address this issue P2 The issue is important to a large percentage of users, with a workaround perf This issue is related to performance
4 participants