aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-12-08 12:36:19 -0500
committerScott González <scott.gonzalez@gmail.com>2010-12-08 12:36:19 -0500
commit22671ad4f8e3e2e921c27bd2933fa088950abf2f (patch)
tree0873e7c769b10ce17ad91b45044064837bc42b02
parent63ec1152d810a80596b195301ee3d2cd3d6a1776 (diff)
downloadjquery-ui-22671ad4f8e3e2e921c27bd2933fa088950abf2f.tar.gz
jquery-ui-22671ad4f8e3e2e921c27bd2933fa088950abf2f.zip
Dialog: Moved the default value for the position.of option inside the _position() method to avoid a bug in jQuery 1.3.2. Fixes #6030 - ui.dialog with jQuery 1.3.2 causes RangeError.
This should be reverted in jQuery UI 1.9.
-rw-r--r--tests/unit/dialog/dialog_defaults.js1
-rw-r--r--ui/jquery.ui.dialog.js3
2 files changed, 1 insertions, 3 deletions
diff --git a/tests/unit/dialog/dialog_defaults.js b/tests/unit/dialog/dialog_defaults.js
index 612fd58c8..7c94d3336 100644
--- a/tests/unit/dialog/dialog_defaults.js
+++ b/tests/unit/dialog/dialog_defaults.js
@@ -20,7 +20,6 @@ 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 81df1d19b..c53169b5b 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -57,7 +57,6 @@ $.widget("ui.dialog", {
position: {
my: 'center',
at: 'center',
- of: window,
collision: 'fit',
// ensure that the titlebar is never outside the document
using: function(pos) {
@@ -528,7 +527,7 @@ $.widget("ui.dialog", {
this.uiDialog
// workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781
.css({ top: 0, left: 0 })
- .position(position);
+ .position($.extend({ of: window }, position));
if (!isVisible) {
this.uiDialog.hide();
}