aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-07-11 00:31:24 +0000
committerScott González <scott.gonzalez@gmail.com>2008-07-11 00:31:24 +0000
commitc5352d82b5fc768e50a2fc47e7042d769792feb7 (patch)
treec6a4020e3c1abbcc62c14dcfbd89e06103e41387
parent184f890e069cd0225911db5724894b31bbd00927 (diff)
downloadjquery-ui-c5352d82b5fc768e50a2fc47e7042d769792feb7.tar.gz
jquery-ui-c5352d82b5fc768e50a2fc47e7042d769792feb7.zip
Dialog: Fixed #3086: Fixed problem with auto margins in IE.
-rw-r--r--ui/ui.dialog.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js
index 663713ad4..7a80ad7e1 100644
--- a/ui/ui.dialog.js
+++ b/ui/ui.dialog.js
@@ -244,15 +244,15 @@ $.widget("ui.dialog", {
pTop = Math.max(pTop, minTop);
this.uiDialog.css({top: pTop, left: pLeft});
},
-
+
size: function() {
var container = this.uiDialogContainer,
titlebar = this.uiDialogTitlebar,
content = this.element,
- tbMargin = parseInt(content.css('margin-top'), 10)
- + parseInt(content.css('margin-bottom'), 10),
- lrMargin = parseInt(content.css('margin-left'), 10)
- + parseInt(content.css('margin-right'), 10);
+ tbMargin = (parseInt(content.css('margin-top'), 10) || 0)
+ + (parseInt(content.css('margin-bottom'), 10) || 0),
+ lrMargin = (parseInt(content.css('margin-left'), 10) || 0)
+ + (parseInt(content.css('margin-right'), 10) || 0);
content.height(container.height() - titlebar.outerHeight() - tbMargin);
content.width(container.width() - lrMargin);
},