Skip to content

Commit

Permalink
fix(popover,tooltip): run transaction inside angular zone (#3909)
Browse files Browse the repository at this point in the history
Co-authored-by: zVolodymyr <volodymyr.baydalka@gmail.com>

Fixes #3896
  • Loading branch information
VolodymyrBaydalka committed Jan 5, 2021
1 parent c2c8512 commit a2d3a44
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/util/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ export class PopupService<T> {

const {nativeElement} = this._windowRef.location;
const onStable$ = this._ngZone.onStable.asObservable().pipe(take(1));
const transition$ = onStable$.pipe(
mergeMap(
() => ngbRunTransition(
nativeElement, ({classList}) => classList.add('show'), {animation, runningTransition: 'continue'})));
const transition$ = onStable$.pipe(mergeMap(() => this._ngZone.run(() => {
return ngbRunTransition(
nativeElement, ({classList}) => classList.add('show'), {animation, runningTransition: 'continue'});
})));

return {windowRef: this._windowRef, transition$};
}
Expand Down

0 comments on commit a2d3a44

Please sign in to comment.