Jquery DIalog Stack stays on top of overlay

330 views Asked by At

I'm having trouble with jQuery ui-dialog plugin. What happens is, whenever I have two or more dialogs stacked, the overlay of each dialog goes to the back of ALL the dialogs, and thus none of them are blocked.

Versions:

Jquery: 1.10.2

Jquery-ui: 1.11.1

How I open them:

function openDialog($divDialog, options){
    var optionsDefault = {
        modal : true,
        autoOpen : true,
        resizable : false,
        closeOnEscape : true,
        close: function(){
            $divDialog.dialog('destroy');
        }
    };
    $.extend( true, optionsDefault, options );
    $divDialog.dialog(optionsDefault);
    $divDialog.dialog( "moveToTop" );
    $divDialog.position({
        my: "center",
        at: "center",
        of: window
    });
}

One dialog, overlay is thin, you can see clearly through

Two dialogs, there are two overlays in the back, so it's darker, and first dialog is not covered, you can interact with it

I think I'm missing something basic about dialog stacking, so hopefully you can help. Thanks in advance!

0

There are 0 answers