Skip to content

Animation in not active material mat-tab makes animated element get stuck in the DOM #54690

@anthonn

Description

@anthonn

Which @angular/* package(s) are the source of the bug?

animations

Is this a regression?

No

Description

If triggering an animation for a component that is currently in an inactive mat-tab, that animation sticks to the DOM and is not removed as it should.

See the attached stackblitz.

  1. Click on the tab "Second" and wait 2 seconds.
  2. Click on the tab "First".

The result is that the div with item0 that was animated got stuck for the TestComponent that was inside of the first mat-tab.

Test example start
image

and end, where the animated div gets stuck in one of the TestComponent
image

Might be related to:
#53492

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/23y3d9

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions