mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Dialog: Fixed the case where you open two modal dialogs and then close the top dialog and inputs in the first dialog were no longer usable - Fixes #4309.
This commit is contained in:
parent
fbb912524d
commit
8936687c18
@ -172,6 +172,17 @@ $.widget("ui.dialog", {
|
|||||||
$.ui.dialog.overlay.resize();
|
$.ui.dialog.overlay.resize();
|
||||||
|
|
||||||
self._isOpen = false;
|
self._isOpen = false;
|
||||||
|
|
||||||
|
// adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
|
||||||
|
if (self.options.modal) {
|
||||||
|
var maxZ = 0;
|
||||||
|
$('.ui-dialog').each(function() {
|
||||||
|
if (this != self.uiDialog[0]) {
|
||||||
|
maxZ = Math.max(maxZ, $(this).css('z-index'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$.ui.dialog.maxZ = maxZ;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
isOpen: function() {
|
isOpen: function() {
|
||||||
@ -572,6 +583,13 @@ $.extend($.ui.dialog.overlay, {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$el.remove();
|
$el.remove();
|
||||||
|
|
||||||
|
// adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
|
||||||
|
var maxZ = 0;
|
||||||
|
$.each(this.instances, function() {
|
||||||
|
maxZ = Math.max(maxZ, this.css('z-index'));
|
||||||
|
});
|
||||||
|
this.maxZ = maxZ;
|
||||||
},
|
},
|
||||||
|
|
||||||
height: function() {
|
height: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user