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

fix(animations): ensure consistent transition namespace ordering #19854

Closed
wants to merge 1 commit into from

Commits on Apr 27, 2021

  1. fix(animations): ensure consistent transition namespace ordering

    When including a component in a template, the component's host element
    is immediately appended as child of the parent node upon creation.
    Hence, `hostElement.parentNode` will be a valid reference. However, if
    the parent component is being inserted as an embedded view—through
    `ngIf` for example—then the parent's node itself will not have been
    inserted yet. This means that we cannot properly determine the position
    of the transition namespace, as any `containsElement` check will return
    false given that the partial DOM tree has not been inserted yet, even
    though it will be contained within an existing transition namespace once
    the partial tree is attached.
    
    This commit fixes the issue by not just looking at the existence of a
    parent node, but rather a more extensive check using the driver's
    `containsElement` method.
    JoostK authored and AndrewKushnir committed Apr 27, 2021
    Copy the full SHA
    cbfe44f View commit details
    Browse the repository at this point in the history