PolymerElements / paper-dialog

A Material Design dialog
https://www.webcomponents.org/element/PolymerElements/paper-dialog
63 stars 41 forks source link

Issue with paper-dialog size in Polymer v1.X #126

Open ebidel opened 8 years ago

ebidel commented 8 years ago

From @troy8 on August 23, 2016 5:14

I have following paper-dialog sekeleton setup inside one of my custom element.

<paper-dialog id="error_dialog">
   <h2>{{error_message}}</h2>
   <p>{{error_detail}}</p>
</paper-dialog>

as and when I get any error I update the values of "error_message" and "error_detail" and open the dialog, something like this dynamically by calling the showErrorInDialog method

showErrorInDialog: function(err) {
     this.error_message = err.message;
     this.error_detail = err.detail;
     this.$.error_dialog.opened = true;
}

But, the problem is, the paper-dialog width is only considered as per the width of h2 tag, e.g.

if h2 is "Error" and "p" is "There is an error with the connection, please check.", then paper-dialog width is as per the "Error" text in h2 only.

Please suggest what I am doing wrong.

Same post in stack http://stackoverflow.com/questions/39076054/issue-with-paper-dialog-size-in-polymer-v1-x?noredirect=1#comment65518885_39076054

Copied from original issue: Polymer/polymer#3877

valdrinkoshi commented 8 years ago

@troy8 I cannot repro with the latest dialog http://jsbin.com/furiwod/1/edit?html,output Could you please provide more info?