Skip to content

Commit 0e15f57

Browse files
committed
Revert "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 reverts commit 22671ad.
1 parent 866c595 commit 0e15f57

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tests/unit/dialog/dialog_defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ var dialog_defaults = {
2020
position: {
2121
my: 'center',
2222
at: 'center',
23+
of: window,
2324
collision: 'fit',
2425
using: $.ui.dialog.prototype.options.position.using
2526
},

ui/jquery.ui.dialog.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ $.widget("ui.dialog", {
5757
position: {
5858
my: 'center',
5959
at: 'center',
60+
of: window,
6061
collision: 'fit',
6162
// ensure that the titlebar is never outside the document
6263
using: function(pos) {
@@ -527,7 +528,7 @@ $.widget("ui.dialog", {
527528
this.uiDialog
528529
// workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781
529530
.css({ top: 0, left: 0 })
530-
.position($.extend({ of: window }, position));
531+
.position(position);
531532
if (!isVisible) {
532533
this.uiDialog.hide();
533534
}

0 commit comments

Comments
 (0)