You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens when the dialog hits the max width and is an issue with how we have the dialog set up in general. I'll be reworking it once #3184 is merged.
@crisbeto Is there a known workaround for this at the moment? Is there a way to apply styling to ".mat-dialog-container" for now that I'm unaware of? When I attempt to set a style to that class in my styleUrl sheet, it is ignored, since it is launched after the page is loaded from a button click.
There is no nice workaround @ryanpm40. Technically adding a max-width to the .cdk-overlay-pane should fix it, but the cdk-overlay-pane is used for all overlay-based Material components. Now that #3184 is merged, I can do a proper fix for it, though.
@crisbeto Gotcha, thanks for the update! I suppose another temporary option for me would be to use some javascript to get the class element (but obviously not very ideal):
let containerElem:HTMLElement = <HTMLElement>document.getElementsByClassName('mat-dialog-container')[0];
containerElem.style.width="900px";
@willshowell , I was testing the feature above, but I must be doing something terribly wrong. I tried to change background color of the backdrop panel and/or of the panel, but it seems to have no effect at all.
Activity
crisbeto commentedon Feb 22, 2017
This happens when the dialog hits the max width and is an issue with how we have the dialog set up in general. I'll be reworking it once #3184 is merged.
LilSebastian5000 commentedon Mar 2, 2017
@crisbeto Is there a known workaround for this at the moment? Is there a way to apply styling to ".mat-dialog-container" for now that I'm unaware of? When I attempt to set a style to that class in my styleUrl sheet, it is ignored, since it is launched after the page is loaded from a button click.
crisbeto commentedon Mar 2, 2017
There is no nice workaround @ryanpm40. Technically adding a
max-widthto the.cdk-overlay-paneshould fix it, but thecdk-overlay-paneis used for all overlay-based Material components. Now that #3184 is merged, I can do a proper fix for it, though.LilSebastian5000 commentedon Mar 2, 2017
@crisbeto Gotcha, thanks for the update! I suppose another temporary option for me would be to use some javascript to get the class element (but obviously not very ideal):
Looking forward to those changes :)
MA-Maddin commentedon Jun 27, 2017
I like the current behaviour that it get shrinked when the config's
widthgets hit, since a dialog should never be larger than screen I guess!?Only problem is that it isn't centered anymore then.
Adding
margin: autoto.mat-dialog-containerdoes the trick.https://github.com/angular/material2/blob/70b31f177a2dacfd08f47b2a8898fca3f7bb91f9/src/lib/dialog/dialog.scss#L19
So workaround for that is adding this to global stylesheet:
http://plnkr.co/edit/yYM6kBUQQe2lQJcVKdcP?p=preview
willshowell commentedon Jun 27, 2017
As another solution, you can add a
panelClassto the dialog and then apply whatever css just to that specific dialog.zijianhuang commentedon Jun 29, 2017
thanks willshowell. This works well, and elegantly enough.
julianobrasil commentedon Jul 4, 2017
@willshowell , I was testing the feature above, but I must be doing something terribly wrong. I tried to change background color of the backdrop panel and/or of the panel, but it seems to have no effect at all.
Is it working properly? Plunker: https://plnkr.co/edit/OjPQdv6Txqcn1v5nXG3p?p=preview
willshowell commentedon Jul 4, 2017
@julianobrasil the styles must be global or without view encapsulation 😁
https://plnkr.co/edit/lGFjGSmhlr9tOoHK1gJp?p=preview
fix(dialog): improved handling of scrollable content
fix(dialog): improved handling of scrollable content
fix(dialog): improved handling of scrollable content
5 remaining items
fix(dialog): improved handling of scrollable content
fix(dialog): improved handling of scrollable content
fix(dialog): improved handling of scrollable content
fix(dialog): improved handling of scrollable content
fix(dialog): improved handling of scrollable content
fix(dialog): improved handling of scrollable content
fix(dialog): improved handling of scrollable content
fix(dialog): improved handling of scrollable content
fix(dialog): improved handling of scrollable content
fix(dialog): improved handling of scrollable content
fix(dialog): improved handling of scrollable content
angular-automatic-lock-bot commentedon May 14, 2022
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.