Primeng: Once responsive dialog width changed by breakpoint, Cannot change ever again

Created on 5 Jun 2017  路  5Comments  路  Source: primefaces/primeng

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)

I could'nt make because #2754 ...

Current behavior

In my project, dialog width change programmatically on window resize.

Responsive dialog change width to 100% when window width become smaller than breakpoint
and then last width value stored in preWidth property.

After that, even if window width became larger than breakpoint again, dialog width not reflect
it's width attribute changing because preWidth overwrite it on window resize.

Expected behavior

Enbale to update preWidth with width attibute when window width becomes larger than breakpoint.

Minimal reproduction of the problem with instructions

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

I want to use dialog with responsive cenrering and keeping ratio of it's width to window's,
(Like before ver 4.0.2 ...)

Please tell us about your environment:

  • Angular version: 4.0.3

  • PrimeNG version: 4.0.3

  • Browser: Chrome 58.0.3029.110 (64-bit)

  • Language: TypeScript 2.3.2

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

pending-review

Most helpful comment

Our team is experiencing the same problem with the dialog not resizing after it hits the mobile break point. We are also programmatically changing the width of the dialog to fill 75% of the screen at all times except for mobile obviously.

All 5 comments

I'm having a lot of bugginess around dialogs when loading dynamic content. We've had to used fixed widths but it doesnt allow dialogs to work properly on mobile.

Our team is experiencing the same problem with the dialog not resizing after it hits the mobile break point. We are also programmatically changing the width of the dialog to fill 75% of the screen at all times except for mobile obviously.

Hello, I am having the same problem as described here. After mobile breakpoint, on dialog is applied width in pixels, and if the screen is resized back to desktop, the dialog still keeps the width value from mobile breakpoint. Any advices?

@ivijan there is a style input property on the dialog. You can overwrite the width style by passing it to that input. We are using a component getter to dynamically size the dialog base on our needs and then passing it to the [style] input on the component.

Unable to replicate with latest PrimeNG, if the issue persists please create a new ticket with a test case reproducing the issue e.g. stackblitz or a github repo and it will be reviewed by our team once again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

garethlewis picture garethlewis  路  3Comments

KannanMuruganmony picture KannanMuruganmony  路  3Comments

philly-vanilly picture philly-vanilly  路  3Comments

Faigjaz picture Faigjaz  路  3Comments

miresk picture miresk  路  3Comments