From af9864dcc439bf8d04f4ade248725cc217f66d56 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 27 Aug 2010 16:49:07 -0400 Subject: [PATCH] Dialog: Don't return true when we don't want to cancel events. Fixes #3523 - Dialog: onclick return value ignored. --- ui/jquery.ui.dialog.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.39.5