Skip to content

Commit af9864d

Browse files
committed
Dialog: Don't return true when we don't want to cancel events. Fixes #3523 - Dialog: onclick return value ignored.
1 parent 1e28040 commit af9864d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ui/jquery.ui.dialog.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,10 @@ $.extend($.ui.dialog.overlay, {
693693
if ($.ui.dialog.overlay.instances.length) {
694694
$(document).bind($.ui.dialog.overlay.events, function(event) {
695695
// stop events if the z-index of the target is < the z-index of the overlay
696-
return ($(event.target).zIndex() >= $.ui.dialog.overlay.maxZ);
696+
// we cannot return true when we don't want to cancel the event (#3523)
697+
if ($(event.target).zIndex() < $.ui.dialog.overlay.maxZ) {
698+
return false;
699+
}
697700
});
698701
}
699702
}, 1);

0 commit comments

Comments
 (0)