From: Scott González Date: Fri, 27 Aug 2010 20:49:07 +0000 (-0400) Subject: Dialog: Don't return true when we don't want to cancel events. Fixes #3523 - Dialog... X-Git-Tag: 1.8.5~45 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=af9864dcc439bf8d04f4ade248725cc217f66d56;p=jquery-ui.git Dialog: Don't return true when we don't want to cancel events. Fixes #3523 - Dialog: onclick return value ignored. --- diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 44f5cbbbc..1f3bd60f0 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -693,7 +693,10 @@ $.extend($.ui.dialog.overlay, { if ($.ui.dialog.overlay.instances.length) { $(document).bind($.ui.dialog.overlay.events, function(event) { // 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);