Skip to content
Permalink
Browse files

Dialog: Fixed modal dialogs so they are always on top of other dialog…

…s when they open.
  • Loading branch information
scottgonzalez committed Jun 4, 2008
1 parent 0b2be30 commit b6858b447cc1a2eec2a8d3d85278ecd9b15eb864
Showing with 5 additions and 3 deletions.
  1. +5 −3 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() {

0 comments on commit b6858b4

Please sign in to comment.
You can’t perform that action at this time.