File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/jigsaw/pc-components/notification Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {JigsawTrustedHtmlModule} from "../../common/directive/trusted-html/trust
1515import { CommonUtils } from "../../common/core/utils/common-utils" ;
1616import { JigsawButtonModule } from "../button/button" ;
1717import { InternalUtils } from "../../common/core/utils/internal-utils" ;
18+ import { take } from 'rxjs/operators' ;
1819
1920/**
2021 * 提示框所处的位置,目前支持左上、左下、右上、右下4个方向。
@@ -420,7 +421,10 @@ export class JigsawNotification extends AbstractDialogComponentBase {
420421 popupInfo . instance . _popupInfo = popupInfo ;
421422 notificationInstances [ NotificationPosition [ opt . position ] ] . push ( popupInfo ) ;
422423
423- Promise . resolve ( ) . then ( ( ) => this . reposition ( opt . position ) ) ;
424+ let onStableSubscription = InternalUtils . zone . onStable . asObservable ( ) . pipe ( take ( 1 ) ) . subscribe ( ( ) => {
425+ onStableSubscription . unsubscribe ( ) ;
426+ this . reposition ( opt . position ) ;
427+ } ) ;
424428
425429 if ( ! this . _removeResizeListener ) {
426430 InternalUtils . zone . runOutsideAngular ( ( ) => {
You can’t perform that action at this time.
0 commit comments