]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: Changed overlay to use zIndex() to test which events to cancel (fixed #4363...
authorBrant Burnett <btburnett3@gmail.com>
Fri, 29 Jan 2010 21:18:57 +0000 (21:18 +0000)
committerBrant Burnett <btburnett3@gmail.com>
Fri, 29 Jan 2010 21:18:57 +0000 (21:18 +0000)
ui/jquery.ui.dialog.js

index a0be847d4988a51bdea16ab5082a01d5892a4fc8..7694810b1241ec9ce88dbb221df1e8c93b0cf7ad 100644 (file)
@@ -600,8 +600,8 @@ $.extend($.ui.dialog.overlay, {
                                // handle $(el).dialog().dialog('close') (see #4065)
                                if ($.ui.dialog.overlay.instances.length) {
                                        $(document).bind($.ui.dialog.overlay.events, function(event) {
-                                               var dialogZ = $(event.target).parents('.ui-dialog').css('zIndex') || 0;
-                                               return (dialogZ > $.ui.dialog.overlay.maxZ);
+                                               // stop events if the z-index of the target is <= the z-index of the overlay
+                                               return ($(event.target).zIndex() > $.ui.dialog.overlay.maxZ);
                                        });
                                }
                        }, 1);