Skip to content

Commit ecb0de8

Browse files
author
Lisaj
committed
Dialog overlay: prevent event return onli false is stop event. Fixed #5728 - IE7/8 Datepicker returns you to the top of a page
1 parent 9241757 commit ecb0de8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/jquery.ui.dialog.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,9 @@ $.extend($.ui.dialog.overlay, {
689689
if ($.ui.dialog.overlay.instances.length) {
690690
$(document).bind($.ui.dialog.overlay.events, function(event) {
691691
// stop events if the z-index of the target is < the z-index of the overlay
692-
return ($(event.target).zIndex() >= $.ui.dialog.overlay.maxZ);
692+
if ($(event.target).zIndex() < $.ui.dialog.overlay.maxZ) {
693+
return false;
694+
}
693695
});
694696
}
695697
}, 1);

0 commit comments

Comments
 (0)