Skip to content

Commit 22671ad

Browse files
committed
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.
1 parent 63ec115 commit 22671ad

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

tests/unit/dialog/dialog_defaults.js

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ var dialog_defaults = {
2020
position: {
2121
my: 'center',
2222
at: 'center',
23-
of: window,
2423
collision: 'fit',
2524
using: $.ui.dialog.prototype.options.position.using
2625
},

ui/jquery.ui.dialog.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ $.widget("ui.dialog", {
5757
position: {
5858
my: 'center',
5959
at: 'center',
60-
of: window,
6160
collision: 'fit',
6261
// ensure that the titlebar is never outside the document
6362
using: function(pos) {
@@ -528,7 +527,7 @@ $.widget("ui.dialog", {
528527
this.uiDialog
529528
// workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781
530529
.css({ top: 0, left: 0 })
531-
.position(position);
530+
.position($.extend({ of: window }, position));
532531
if (!isVisible) {
533532
this.uiDialog.hide();
534533
}

0 commit comments

Comments
 (0)