aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/unit/dialog/dialog_defaults.js1
-rw-r--r--ui/jquery.ui.dialog.js3
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/unit/dialog/dialog_defaults.js b/tests/unit/dialog/dialog_defaults.js
index 7c94d3336..612fd58c8 100644
--- a/tests/unit/dialog/dialog_defaults.js
+++ b/tests/unit/dialog/dialog_defaults.js
@@ -20,6 +20,7 @@ var dialog_defaults = {
position: {
my: 'center',
at: 'center',
+ of: window,
collision: 'fit',
using: $.ui.dialog.prototype.options.position.using
},
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index c53169b5b..81df1d19b 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -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();
}