diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index c4179667a8f..4e36e049832 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -1333,7 +1333,8 @@ jQuery(document).ready(function() { if (widthPopup + right >= widthDocument) { //right = 10; } - parentHolder.toggleClass("open"); + + parentHolder.toggleClass("open"); /* If open, it closes, if closed, it opens */ // Check tooltip is in viewport let dropDownContentTop = dropDownContent.offset().top; @@ -1363,9 +1364,10 @@ jQuery(document).ready(function() { // Close drop down jQuery(document).on("click", function(event) { // search if click was outside drop down - if (!$(event.target).closest('.dropdown-toggle').length) { - let parentholder = jQuery(".dropdown-toggle").closest(".dropdown.open"); - if(parentholder){ + if (!$(event.target).closest('.butAction.dropdown-toggle').length) { + /* console.log("click close butAction - we click outside"); */ + let parentholder = jQuery(".butAction.dropdown-toggle").closest(".dropdown.open"); + if (parentholder){ // Hide the menus. parentholder.removeClass("open --up --left"); } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 7487cb09a59..36388ed486e 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2735,14 +2735,14 @@ function top_menu_user($hideloginname = 0, $urllogout = '')