Skip to main content

Search and Top Navigation

#7541 closed bug (notabug)

Opened July 11, 2011 02:40PM UTC

Closed July 26, 2011 08:06AM UTC

height: 'auto' broken when using a Dialog constructed within a loaded div

Reported by: battok Owned by: battok
Priority: minor Milestone: 1.9.0
Component: ui.dialog Version: 1.8.14
Keywords: Cc:
Blocked by: Blocking:
Description

Page with dialog:

<link type="text/css" href="Styles/jquery-ui-1.8.14.custom.css" rel="stylesheet" />

<script type="text/javascript" src="Scripts/jquery-1.5.1.min.js"></script>

<script type="text/javascript" src="Scripts/jquery-ui-1.8.14.custom.min.js"></script>

<script type="text/javascript" src="Scripts/jquery.validate.js"></script>

<script type="text/javascript">

$(function () {

var $dialogTimeout = $("<div id='testDialog'></div>").appendTo(jQuery("form:first"));

$dialogTimeout.load("jqueryDialogExample.aspx", function (response, status, xhr) {

if (status == "success") {

$(this).dialog({

title: "Hi",

resizable: false,

width: '600px',

height: 'auto',

close: function (event, ui) {

$dialogTimeout.empty();

$dialogTimeout.dialog("destroy");

$dialogTimeout.remove();

},

modal: true

});

}

});

});

</script>

Dialog html:

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<link type="text/css" href="Styles/jquery-ui-1.8.14.custom.css" rel="stylesheet" />

<script type="text/javascript" src="Scripts/jquery-1.5.1.min.js"></script>

<script type="text/javascript" src="Scripts/jquery-ui-1.8.14.custom.min.js"></script>

<script type="text/javascript">

$(document).ready(function () {

$('#testButton').click(function () {

$("#notinform").html('losts of stuff to add <br /> like this <br /> like this <br /> like this');

});

});

</script>

<title></title>

</head>

<body>

<form id="form1" runat="server">

<div id="appendToThis">

<input type='text' class='required' title='this is required' id='textInput' />

<ul id='errors'></ul>

<br />

<a id='testButton'>Click Me!</a>

<br />

<table>

<tr>

<td>This Area</td>

</tr>

</table>

</div>

</form>

<div id="notinform"></div>

</body>

</html>

By adding the following line of code after the dialog is constructed, you can workaround the issue: $dialogTimeout.height('auto')

Attachments (0)
Change History (2)

Changed July 11, 2011 02:56PM UTC by rdworth comment:1

owner: → battok
status: newpending

See the big red note above "Please use jsFiddle or jsbin to provide test cases instead of pasting large blocks of code in the ticket."

Changed July 26, 2011 08:06AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!