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.
This commit is contained in:
Scott González 2010-12-08 12:36:19 -05:00
parent 63ec1152d8
commit 22671ad4f8
2 changed files with 1 additions and 3 deletions

View File

@ -20,7 +20,6 @@ var dialog_defaults = {
position: { position: {
my: 'center', my: 'center',
at: 'center', at: 'center',
of: window,
collision: 'fit', collision: 'fit',
using: $.ui.dialog.prototype.options.position.using using: $.ui.dialog.prototype.options.position.using
}, },

View File

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