primeng icon indicating copy to clipboard operation
primeng copied to clipboard

p-confirmdialog is not centered to browser

Open LegacyEbenZhang opened this issue 9 years ago • 6 comments

I'm submitting a ... (check one with "x")

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports) Please fork the plunkr below and create a case demonstrating your bug report. Issues without a plunkr have much less possibility to be reviewed.

http://plnkr.co/edit/dvC3zTPeKKQ1XQ25wF5C?p=preview

Current behavior

When width of the p-confirmdialog is not set, the dialog is not centered to the page. If you resize your browser, the dialog will be properly repositioned to center.

Expected behavior

The dialog should be centered to the browser.

Minimal reproduction of the problem with instructions

Press the Show Dialog button in the plunker.

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

Chrome Version 56.0.2924.87 Windows 10

  • Angular version: 2.0.X

"@angular/core": "^2.3.1",

  • PrimeNG version: 2.0.X

Tried both 2.0.1 and 2.0.0

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Chrome Version 56.0.2924.87, Microsoft Edge 38.14393.0.0

  • Language: [all | TypeScript X.X | ES6/7 | ES5] "typescript": "~2.0.3"

  • Node (for AoT issues): node --version =
    v6.9.2

LegacyEbenZhang avatar Feb 24 '17 07:02 LegacyEbenZhang

Also experiencing this issue... Any workaround?

lebnic avatar Mar 01 '17 17:03 lebnic

@lebnic

I set the min-width to 425px when the screen is bigger than 768px to workaround the issue.

// p-confirmation dialog is not centered to the browser without setting the width
@media only screen and (min-width : 768px) {
  .ui-confirmdialog{
    min-width: 425px;
  }
}

LegacyEbenZhang avatar Mar 02 '17 01:03 LegacyEbenZhang

Thanks

lebnic avatar Mar 02 '17 12:03 lebnic

Same problem here but the solution of @EbenZhangEmbed doesn't work I use Angular 4.2 and PrimeNG 4.0.3

k20human avatar Jun 14 '17 10:06 k20human

+1

atomdmac avatar Jun 22 '17 15:06 atomdmac

+1

ARandomDude avatar Jun 28 '17 00:06 ARandomDude