diff --git a/addons/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js b/addons/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js index f0fa9c321d4..9992bc6337c 100644 --- a/addons/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js +++ b/addons/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js @@ -8952,7 +8952,8 @@ $.extend( $.ui.dialog.overlay, { $( document ).bind( $.ui.dialog.overlay.events, function( event ) { // stop events if the z-index of the target is < the z-index of the overlay // we cannot return true when we don't want to cancel the event (#3523) - if ( $(event.target).closest('.ui-dialog').zIndex() < $.ui.dialog.overlay.maxZ ) { + if ($(event.target).zIndex() < $.ui.dialog.overlay.maxZ && + $(event.target).closest('.ui-dialog').zIndex() < $.ui.dialog.overlay.maxZ) { return false; } });