mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Dialog: Ensure dialogs have a z-index when calculating the max z-index. Fixex #5955 - Dialog: Closing UI dialog when z-index is not defined in any .ui-dialog class, causes NaN to be used as Z-index, throwing an error. Fixes #4652 - Dialog: Event loss in subsequent dialog calls (FF3).
This commit is contained in:
parent
abfa0e1e95
commit
8bb412dd4a
7
ui/jquery.ui.dialog.js
vendored
7
ui/jquery.ui.dialog.js
vendored
@ -228,7 +228,7 @@ $.widget("ui.dialog", {
|
||||
|
||||
close: function(event) {
|
||||
var self = this,
|
||||
maxZ;
|
||||
maxZ, thisZ;
|
||||
|
||||
if (false === self._trigger('beforeClose', event)) {
|
||||
return;
|
||||
@ -257,7 +257,10 @@ $.widget("ui.dialog", {
|
||||
maxZ = 0;
|
||||
$('.ui-dialog').each(function() {
|
||||
if (this !== self.uiDialog[0]) {
|
||||
maxZ = Math.max(maxZ, $(this).css('z-index'));
|
||||
thisZ = $(this).css('z-index');
|
||||
if(!isNaN(thisZ)) {
|
||||
maxZ = Math.max(maxZ, thisZ);
|
||||
}
|
||||
}
|
||||
});
|
||||
$.ui.dialog.maxZ = maxZ;
|
||||
|
Loading…
Reference in New Issue
Block a user