Skip to content

Commit

Permalink
fix(workbench/message-box): display message box with properties as se…
Browse files Browse the repository at this point in the history
…t in message box component

closes #253
  • Loading branch information
danielwiehl authored and Marcarrian committed Feb 3, 2021
1 parent 4159a09 commit 496249e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ export class MessageBoxComponent implements OnInit, OnDestroy {
}

public ngOnInit(): void {
this.portal = this.createPortal(this.messageBox);
// Create the portal in a microtask for instant synchronization of message box properties with the user interface,
// for example, if they are set in the constructor of the message box component.
asapScheduler.schedule(() => {
this.portal = this.createPortal(this.messageBox);
this._cd.detectChanges();
});
this.textSelectable = this.messageBox.config.contentSelectable;
this.installBlinkRequestHandler();
this.installFocusRequestHandler();
Expand Down

0 comments on commit 496249e

Please sign in to comment.