]> source.dussan.org Git - jquery-ui.git/commitdiff
Revert "Dialog: Moved the default value for the position.of option inside the _positi...
authorScott González <scott.gonzalez@gmail.com>
Fri, 10 Dec 2010 18:42:29 +0000 (13:42 -0500)
committerScott González <scott.gonzalez@gmail.com>
Fri, 10 Dec 2010 18:42:29 +0000 (13:42 -0500)
This reverts commit 22671ad4f8e3e2e921c27bd2933fa088950abf2f.

tests/unit/dialog/dialog_defaults.js
ui/jquery.ui.dialog.js

index 7c94d3336817c37966b2940352154ecd054efc91..612fd58c89c43f74d6f4d0e05b5a8b509989fad4 100644 (file)
@@ -20,6 +20,7 @@ var dialog_defaults = {
        position: {
                my: 'center',
                at: 'center',
+               of: window,
                collision: 'fit',
                using: $.ui.dialog.prototype.options.position.using
        },
index c53169b5bbcd069ac3444e497a3bfe4d549a7fab..81df1d19b3840b944deaf5b8e738936d082dd5d6 100644 (file)
@@ -57,6 +57,7 @@ $.widget("ui.dialog", {
                position: {
                        my: 'center',
                        at: 'center',
+                       of: window,
                        collision: 'fit',
                        // ensure that the titlebar is never outside the document
                        using: function(pos) {
@@ -527,7 +528,7 @@ $.widget("ui.dialog", {
                this.uiDialog
                        // workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781
                        .css({ top: 0, left: 0 })
-                       .position($.extend({ of: window }, position));
+                       .position(position);
                if (!isVisible) {
                        this.uiDialog.hide();
                }