diff --git a/assets/src/js/base/sidebar.js b/assets/src/js/base/sidebar.js index 5b748aaf7..16f98c752 100644 --- a/assets/src/js/base/sidebar.js +++ b/assets/src/js/base/sidebar.js @@ -87,8 +87,13 @@ $(document).ready(function () { // Gestione click sulla sidebar per evitare chiusura $(".control-sidebar").on("click", function (e) { - if (largeScreen && e.target.tagName === 'A' && $(".main-footer").hasClass("with-control-sidebar")) { - toggleControlSidebar(); + const target = $(e.target); + if (largeScreen && $(".main-footer").hasClass("with-control-sidebar")) { + if (e.target.tagName === 'A') { + toggleControlSidebar(); + } else if (e.target.tagName === 'LI' && target.find("a").hasClass("disabled")) { + toggleControlSidebar(); + } } });