Dialog auto height not working
I have a simple non-modal dialog that I use to display content. The content is very short, one or two lines at most. The height of the dialog box does not adjust to the height of the content. It's always fixed.
Here is an example. I don't want a title bar or buttons, just the content. So I initialize the dialog box like this.
- this.speechDialog.dialog({
autoOpen: false,
show: {
effect: "blind",
duration: 500
},
hide: {
effect: "fade",
duration: 1000
},
position: {
my: "left top",
at: "right-20 bottom-30",
of : "#AvatarCanvas"
},
width: "200",
height: "auto"
});
this.speechDialog.siblings('.ui-dialog-titlebar').remove();
- // Then later when a click event occurs, I inject the text and open the dialog.
- this.speechDialog.html(text);
- this.speechDialog.dialog("open");
However, I've noticed that the dialog's height never resizes to the height of the text. It's always a fixed height. It does expand. It does not contract.