]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: Fixed #3221: User outerWidth/Height for positioning.
authorScott González <scott.gonzalez@gmail.com>
Fri, 19 Dec 2008 20:34:54 +0000 (20:34 +0000)
committerScott González <scott.gonzalez@gmail.com>
Fri, 19 Dec 2008 20:34:54 +0000 (20:34 +0000)
ui/ui.dialog.js

index 558e32084867dcdabc268b88052d8a5c488a316b..8fb5ae5e39490d7315c28a250508cd4daeeb2942 100644 (file)
@@ -335,11 +335,11 @@ $.widget("ui.dialog", {
                                        pLeft += 0;
                                        break;
                                case 'right':
-                                       pLeft += wnd.width() - this.uiDialog.width();
+                                       pLeft += wnd.width() - this.uiDialog.outerWidth();
                                        break;
                                default:
                                case 'center':
-                                       pLeft += (wnd.width() - this.uiDialog.width()) / 2;
+                                       pLeft += (wnd.width() - this.uiDialog.outerWidth()) / 2;
                        }
                }
                if (pos[1].constructor == Number) {
@@ -351,12 +351,12 @@ $.widget("ui.dialog", {
                                        break;
                                case 'bottom':
                                        // Opera check fixes #3564, can go away with jQuery 1.3
-                                       pTop += ($.browser.opera ? window.innerHeight : wnd.height()) - this.uiDialog.height();
+                                       pTop += ($.browser.opera ? window.innerHeight : wnd.height()) - this.uiDialog.outerHeight();
                                        break;
                                default:
                                case 'middle':
                                        // Opera check fixes #3564, can go away with jQuery 1.3
-                                       pTop += (($.browser.opera ? window.innerHeight : wnd.height()) - this.uiDialog.height()) / 2;
+                                       pTop += (($.browser.opera ? window.innerHeight : wnd.height()) - this.uiDialog.outerHeight()) / 2;
                        }
                }