Permalink
Browse files

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.
  • Loading branch information...
1 parent 63ec115 commit 22671ad4f8e3e2e921c27bd2933fa088950abf2f @scottgonzalez scottgonzalez committed Dec 8, 2010
Showing with 1 addition and 3 deletions.
  1. +0 −1 tests/unit/dialog/dialog_defaults.js
  2. +1 −2 ui/jquery.ui.dialog.js
@@ -20,7 +20,6 @@ var dialog_defaults = {
position: {
my: 'center',
at: 'center',
- of: window,
collision: 'fit',
using: $.ui.dialog.prototype.options.position.using
},
View
@@ -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();
}

0 comments on commit 22671ad

Please sign in to comment.