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:
Scott González 2010-08-27 16:49:07 -04:00
parent 1e28040cf3
commit af9864dcc4

View File

@ -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);