diff options
author | jamiejag <git@jamiegegerson.com> | 2010-11-15 17:45:19 -0800 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-11-19 09:02:01 -0500 |
commit | 8bb412dd4a09d66d0f4a5456410a647e3db38bcc (patch) | |
tree | 85e60f3708e8eb7ffcc1dbb84c503ece580c4eb4 /ui/jquery.ui.dialog.js | |
parent | abfa0e1e951b74548f9441a7ba44325d8c4d55b7 (diff) | |
download | jquery-ui-8bb412dd4a09d66d0f4a5456410a647e3db38bcc.tar.gz jquery-ui-8bb412dd4a09d66d0f4a5456410a647e3db38bcc.zip |
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).
Diffstat (limited to 'ui/jquery.ui.dialog.js')
-rw-r--r-- | ui/jquery.ui.dialog.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index ad9c183ce..c2d5d3e16 100644 --- a/ui/jquery.ui.dialog.js +++ b/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; |