Skip to content

Leave animation not propagated on shadow dom components #46450

@dario-piotrowicz

Description

@dario-piotrowicz

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

animations

Is this a regression?

No

Description

When there is a :leave animation the parent propagates to the event to the children so that they can also animate their :leave transitions, this works as expected whilst using the emulated view encapsulation, but with shadow dom this doesn't actually happen

As you can see here:
Peek 2022-06-21 22-31

Please provide a link to a minimal reproduction of the bug

stackblitz reproduction

Anything else?

  • I actually discovered this whilst looking into Style binding + style animation + non-reused route + emulated encapsulation breaks route transition animation #46360, this explains why in that issue there are inconsistent behaviors between emulated and shadow dom (but the resolution of this issue does resolve the other one, it only makes the emulated and shadow behaviors the same)

  • I have identified where the bug lies (around the _signalRemovalForInnerTriggers function) and I've already implemented a solution (which is pretty straightforward really), I just need to double check it and add unit tests for it, I'll open a PR likely tomorrow or in the next few days anyways 🙂 (I just figured I could open this issue to clarify the bug)

Metadata

Metadata

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: animationscore: CSS encapsulation

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions