mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Dialog: Don't return true when we don't want to cancel events. Fixes #3523 - Dialog: onclick return value ignored.
This commit is contained in:
parent
1e28040cf3
commit
af9864dcc4
5
ui/jquery.ui.dialog.js
vendored
5
ui/jquery.ui.dialog.js
vendored
@ -693,7 +693,10 @@ $.extend($.ui.dialog.overlay, {
|
|||||||
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) {
|
||||||
// stop events if the z-index of the target is < the z-index of the overlay
|
// stop events if the z-index of the target is < the z-index of the overlay
|
||||||
return ($(event.target).zIndex() >= $.ui.dialog.overlay.maxZ);
|
// we cannot return true when we don't want to cancel the event (#3523)
|
||||||
|
if ($(event.target).zIndex() < $.ui.dialog.overlay.maxZ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, 1);
|
}, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user