p-dialog not being centered on first display

jQuery UI Widgets
Post Reply
zapstes
Posts: 5
Joined: 24 Nov 2016, 19:03

24 Nov 2016, 19:11

I'm building an angular 2 application, and am building a dialog modal form, using p-dialog. I'm noticing that in some instances, the dialog window is being displayed at the far left of the screen. However, on dragging the browser window, the dialog gets centered correctly.

I'm creating a very simple dialog (as per primeng documentation):
<p-dialog header="Title" [(visible)]="display">
Content
</p-dialog>

Any ideas why the dialog is not being centered from the beginning?

zapstes
Posts: 5
Joined: 24 Nov 2016, 19:03

25 Nov 2016, 15:22

After investigating further I found out that the issue was that the dialog was wrapped around in an ngIf. After removing that, the positioning was corrected.

Post Reply

Return to “PrimeUI”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 15 guests