File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/core/components/loading Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,18 @@ export class CoreLoadingComponent implements AsyncDirective, OnDestroy {
117117 if ( CorePlatform . isIOS ( ) ) {
118118 this . mutationObserver . observe ( this . element , { childList : true } ) ;
119119 }
120+
121+ // Emulate leave animation by adding a class and removing the element after the animation is done.
122+ // This is needed to solve animation.leave problem introduced in Angular 20.3.6.
123+ // @TODO : Remove this workaround when updating to Angular v21, as the problem should be fixed by then.
124+ const container = this . element . querySelector ( '.core-loading-container' ) ;
125+ if ( container && ! container ?. classList . contains ( 'hide-animation' ) ) {
126+ container ?. classList . add ( 'hide-animation' ) ;
127+
128+ setTimeout ( ( ) => {
129+ container ?. remove ( ) ;
130+ } , 500 ) ;
131+ }
120132 } else {
121133 this . mutationObserver . disconnect ( ) ;
122134 }
You can’t perform that action at this time.
0 commit comments