Having looked into Make JQuery UI Dialog automatically grow or shrink to fit its contents, I am using the height: \"auto\"
option when building a jQuery modal dialo
This is 4 years Late but i have the same problem.
Wrote code that fixed it
Put a unique class on your dialog:
dialogClass:"someClassName"
$(".someClassName").resize(function () {
var totalHeight = 0;
var children = $(".someClassName").children(); //get all divs inside the dialog
for (var i = 0; i < children.length; i++) {
if ($(children[i]).innerWidth() > 15) {
var childrenHeight = children[i].scrollHeight;
totalHeight += childrenHeight;//make sure your dialog will be the correct height
}
}
$("#idOfContentWithWrongHeight").innerHeight($("#idOfContentWithWrongHeight")[0].scrollHeight);//put the content at the height it should appear
$(".someClassName").height(totalHeight);//update the height of the dialog
});