From ecb0de8463147c599e37f32b4596152af24b58d4 Mon Sep 17 00:00:00 2001 From: Lisaj Date: Thu, 17 Jun 2010 03:35:45 -0700 Subject: [PATCH] Dialog overlay: prevent event return onli false is stop event. Fixed #5728 - IE7/8 Datepicker returns you to the top of a page --- ui/jquery.ui.dialog.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 6e538b6e58a..5b00e5e9ffb 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -689,7 +689,9 @@ $.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); + if ($(event.target).zIndex() < $.ui.dialog.overlay.maxZ) { + return false; + } }); } }, 1);