Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#4439 closed bug (duplicate)

Second modal dialog disables input fields in first modal dialog.

Reported by: nbubna Owned by:
Priority: minor Milestone:
Component: ui.dialog Version: 1.7
Keywords: Cc:
Blocked by: Blocking:

Description

Open one modal dialog with form to create a new Foo. Entering invalid data triggers second modal dialog with error message. Once the second one is closed, you can no longer edit the fields in the first modal dialog to fix the error. Only tested in firefox.

Seems i'm not the first to find this: http://groups.google.com/group/jquery-ui/browse_thread/thread/96e731e6a49fae5/53f54c04279f5427?lnk=gst&q=modal+dialogs+edit+fields#53f54c04279f5427

Change History (9)

comment:1 Changed 11 years ago by nbubna

Appears to me that the $.ui.dialog.overlay.maxZ and $.ui.dialog.maxZ don't get corrected once the second dialog is closed. I'm not sure how to fix that.

comment:2 Changed 11 years ago by nbubna

As a workaround, i called $firstModalDialog.dialog('moveToTop', true) once the second one is closed. That's about all the time i have for this today.

comment:3 Changed 11 years ago by nbubna

Ah, but just as i was about to move on, i noticed that moveToTop(true) is always called on open. So, on close, it is safe to always just revert the changes to the maxZ values when closing the topmost dialog. Just add this to the end of the close function:

if this was topmost, revert the last moveToTop call http://dev.jqueryui.com/ticket/4439 if ($.ui.dialog.maxZ == self.uiDialog.css('z-index')) {

$.ui.dialog.maxZ = --$.ui.dialog.overlay.maxZ; --$.ui.dialog.overlay.maxZ;

}

comment:4 Changed 11 years ago by nbubna

hmm. formatting issues...

        // if this was topmost, revert the last moveToTop call
        //  http://dev.jqueryui.com/ticket/4439
        if ($.ui.dialog.maxZ == self.uiDialog.css('z-index')) {
            $.ui.dialog.maxZ = --$.ui.dialog.overlay.maxZ;
            --$.ui.dialog.overlay.maxZ;
        }

comment:5 Changed 11 years ago by nbubna

Ok, i tested the bug and the fix in Internet Explorer also.

comment:6 Changed 11 years ago by Scott González

Resolution: duplicate
Status: newclosed

Duplicate of #4309.

comment:7 Changed 9 years ago by captdragon

This is still a problem, please re-open this ticket.

comment:8 Changed 9 years ago by Scott González

Please provide a reduced test case showing that the problem exists.

comment:9 Changed 8 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.