mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Dialog: Changed height measurement to hide content because IE quirks mode ignores height: 0 (Fixed #4350 No Scrollbars in IE in Quirksmode)
This commit is contained in:
parent
a8747488d0
commit
e2202847c6
39
tests/visual/dialog/dialog_ticket_4350.html
Normal file
39
tests/visual/dialog/dialog_ticket_4350.html
Normal file
@ -0,0 +1,39 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Dialog Visual Test : Dialog option modal true</title>
|
||||
<link rel="stylesheet" href="../visual.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
|
||||
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
|
||||
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
|
||||
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
|
||||
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
|
||||
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
|
||||
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
|
||||
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
|
||||
<script type="text/javascript" src="../../../ui/jquery.ui.resizable.js"></script>
|
||||
<script type="text/javascript" src="../../../ui/jquery.ui.dialog.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#dialog").dialog({
|
||||
height: 200
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<input />
|
||||
<div id="dialog" title="Dialog Title">
|
||||
foo<p/>
|
||||
foo<p/>
|
||||
foo<p/>
|
||||
foo<p/>
|
||||
foo<p/>
|
||||
foo<p/>
|
||||
foo<p/>
|
||||
foo<p/>
|
||||
foo<p/>
|
||||
foo<p/>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
14
ui/jquery.ui.dialog.js
vendored
14
ui/jquery.ui.dialog.js
vendored
@ -547,11 +547,9 @@ $.widget("ui.dialog", {
|
||||
var options = this.options;
|
||||
|
||||
// reset content sizing
|
||||
this.element.css({
|
||||
height: 0,
|
||||
minHeight: 0,
|
||||
width: 'auto'
|
||||
});
|
||||
// hide for non content measurement because height: 0 doesn't work in IE quirks mode (see #4350)
|
||||
this.element.css('width', 'auto')
|
||||
.hide();
|
||||
|
||||
// reset wrapper sizing
|
||||
// determine the height of all the non-content elements
|
||||
@ -567,8 +565,10 @@ $.widget("ui.dialog", {
|
||||
height: 'auto'
|
||||
}
|
||||
: {
|
||||
height: Math.max(options.height - nonContentHeight, 0)
|
||||
});
|
||||
minHeight: 0,
|
||||
height: Math.max(options.height - nonContentHeight, 0)
|
||||
})
|
||||
.show();
|
||||
|
||||
(this.uiDialog.is(':data(resizable)') &&
|
||||
this.uiDialog.resizable('option', 'minHeight', this._minHeight()));
|
||||
|
Loading…
Reference in New Issue
Block a user