mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Dialog: Changed overlay to use zIndex() to test which events to cancel (fixed #4363 Datepicker Month/Year Dropdowns Not Working In Safari In A Dialog)
This commit is contained in:
parent
76f7e835b3
commit
58a3a99e1e
4
ui/jquery.ui.dialog.js
vendored
4
ui/jquery.ui.dialog.js
vendored
@ -600,8 +600,8 @@ $.extend($.ui.dialog.overlay, {
|
|||||||
// handle $(el).dialog().dialog('close') (see #4065)
|
// handle $(el).dialog().dialog('close') (see #4065)
|
||||||
if ($.ui.dialog.overlay.instances.length) {
|
if ($.ui.dialog.overlay.instances.length) {
|
||||||
$(document).bind($.ui.dialog.overlay.events, function(event) {
|
$(document).bind($.ui.dialog.overlay.events, function(event) {
|
||||||
var dialogZ = $(event.target).parents('.ui-dialog').css('zIndex') || 0;
|
// stop events if the z-index of the target is <= the z-index of the overlay
|
||||||
return (dialogZ > $.ui.dialog.overlay.maxZ);
|
return ($(event.target).zIndex() > $.ui.dialog.overlay.maxZ);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, 1);
|
}, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user