#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 14 years ago by
comment:2 Changed 14 years ago by
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 14 years ago by
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 14 years ago by
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:8 Changed 12 years ago by
Please provide a reduced test case showing that the problem exists.
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.