diff options
author | Scott González <scott.gonzalez@gmail.com> | 2008-06-04 17:31:58 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2008-06-04 17:31:58 +0000 |
commit | b6858b447cc1a2eec2a8d3d85278ecd9b15eb864 (patch) | |
tree | c1676dc6d46eddfff136d774f34fb2b5947f574a /ui | |
parent | 0b2be30492a91f7392845ee82befe16e65b061a2 (diff) | |
download | jquery-ui-b6858b447cc1a2eec2a8d3d85278ecd9b15eb864.tar.gz jquery-ui-b6858b447cc1a2eec2a8d3d85278ecd9b15eb864.zip |
Dialog: Fixed modal dialogs so they are always on top of other dialogs when they open.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/source/ui.dialog.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/source/ui.dialog.js b/ui/source/ui.dialog.js index 40356e518..4299910b3 100644 --- a/ui/source/ui.dialog.js +++ b/ui/source/ui.dialog.js @@ -230,7 +230,7 @@ $.widget("ui.dialog", { this.uiDialog.appendTo('body'); this.position(this.options.position); this.uiDialog.show(); - this.moveToTop(); + this.moveToTop(true); // CALLBACK: open var openEV = null; @@ -241,8 +241,10 @@ $.widget("ui.dialog", { this.element.triggerHandler("dialogopen", [openEV, openUI], this.options.open); }, - moveToTop: function() { - if (this.options.modal || !this.options.stack) { return; } + // the force parameter allows us to move modal dialogs to their correct + // position on open + moveToTop: function(force) { + if ((this.options.modal && !force) || !this.options.stack) { return; } var maxZ = this.options.zIndex, options = this.options; $('.ui-dialog:visible').each(function() { |