diff options
author | Brant Burnett <btburnett3@gmail.com> | 2010-02-22 17:37:08 +0000 |
---|---|---|
committer | Brant Burnett <btburnett3@gmail.com> | 2010-02-22 17:37:08 +0000 |
commit | e2202847c6a8837bb732cc21401915b82e433c50 (patch) | |
tree | 8938e80c15a884de773d05435c0e32c1899fc886 | |
parent | a8747488d0e78400f3a038b8777ade867f678984 (diff) | |
download | jquery-ui-e2202847c6a8837bb732cc21401915b82e433c50.tar.gz jquery-ui-e2202847c6a8837bb732cc21401915b82e433c50.zip |
Dialog: Changed height measurement to hide content because IE quirks mode ignores height: 0 (Fixed #4350 No Scrollbars in IE in Quirksmode)
-rw-r--r-- | tests/visual/dialog/dialog_ticket_4350.html | 39 | ||||
-rw-r--r-- | ui/jquery.ui.dialog.js | 14 |
2 files changed, 46 insertions, 7 deletions
diff --git a/tests/visual/dialog/dialog_ticket_4350.html b/tests/visual/dialog/dialog_ticket_4350.html new file mode 100644 index 000000000..002b676cd --- /dev/null +++ b/tests/visual/dialog/dialog_ticket_4350.html @@ -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>
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 167ffaca7..6d13935de 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -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())); |