Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Dialog: Ensure dialogs have a z-index when calculating the max z-inde…

…x. 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).
  • Loading branch information...
commit 8bb412dd4a09d66d0f4a5456410a647e3db38bcc 1 parent abfa0e1
@jamiejag jamiejag authored scottgonzalez committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 ui/jquery.ui.dialog.js
View
7 ui/jquery.ui.dialog.js
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.