Visitar URL original
bug(animations): Element rendered twice when animated · Issue #26133 · angular/angular · GitHub
The Wayback Machine - https://web.archive.org/web/20250821131744/https://github.com/angular/angular/issues/26133
Skip to content

bug(animations): Element rendered twice when animated #26133

@macjohnny

Description

@macjohnny

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:

Current behavior

Expected behavior

Minimal reproduction of the problem with instructions

When triggering an animation of an element shown with *ngIf while an animation is already running, the element is rendered twice:
bildschirmfoto 2018-09-27 um 12 31 37
The pink and the blue box should only be shown once. This happens when hitting the toggle button multiple times in the following example: angular 7.0.0-beta.7

This also occurs with angular 6.1.9: angular 6.1.9

This issue seems related to #23302

Note: at no time there exists more than one component instance, see this example: https://stackblitz.com/edit/angular-gitter-dp3cub
bildschirmfoto 2018-09-27 um 12 58 12

What is the motivation / use case for changing the behavior?

It's a bug

Environment


Angular version: 7.0.0-beta.7


Browser:
- [x] Chrome (desktop) version 68
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [x] Firefox version 62
- [x] Safari (desktop) version 12
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions