From e2202847c6a8837bb732cc21401915b82e433c50 Mon Sep 17 00:00:00 2001 From: Brant Burnett Date: Mon, 22 Feb 2010 17:37:08 +0000 Subject: Dialog: Changed height measurement to hide content because IE quirks mode ignores height: 0 (Fixed #4350 No Scrollbars in IE in Quirksmode) --- tests/visual/dialog/dialog_ticket_4350.html | 39 +++++++++++++++++++++++++++++ ui/jquery.ui.dialog.js | 14 +++++------ 2 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 tests/visual/dialog/dialog_ticket_4350.html 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 @@ + + + Dialog Visual Test : Dialog option modal true + + + + + + + + + + + + + + + +
+ foo

+ foo

+ foo

+ foo

+ foo

+ foo

+ foo

+ foo

+ foo

+ foo

+

+ + + 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())); -- cgit v1.2.3