Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cdk/overlay): animations interrupted on repeat insertions (#24815)
When an overlay is detached, we remove it from the change detection tree and the DOM, but we don't destroy it completely so that it can be re-attached. Re-attachment is the same process, but in reverse: we re-add the element to the DOM and the change detection tree. The problem is that we were attaching the element to the change detection tree before re-inserting it into the DOM which caused the Angular animations package not to animate the element since it's not in the DOM yet. These changes resolve the issue by attaching the element to the DOM first. Fixes #24749. (cherry picked from commit 0faba6e)
- Loading branch information