From 16977df4fb6092e0be02d633d8c7803a9ea5dc5d Mon Sep 17 00:00:00 2001 From: Mikita Pilinka Date: Thu, 23 May 2024 13:00:55 +0200 Subject: [PATCH] fix: navigation tree collapse issue Ticket: ENT-11373 Changelog: None Signed-off-by: Mikita Pilinka (cherry picked from commit 92068ae3aeed83acb9f4de5263f066a53ff4d82a) --- generator/_assets/js/custom.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/generator/_assets/js/custom.js b/generator/_assets/js/custom.js index e049056df..e6a8d215b 100755 --- a/generator/_assets/js/custom.js +++ b/generator/_assets/js/custom.js @@ -302,7 +302,12 @@ if (window.innerWidth > 1023) { document.querySelectorAll('.mainMenu li.parent > i').forEach(function (element) { element.onclick = function (event) { event.stopImmediatePropagation(); - element.closest('li.parent').classList.toggle('opened'); + var parent = element.closest('li.parent'); + parent.classList.toggle('opened'); + var openedSubmenus = parent.querySelectorAll('.' +openedClass); + openedSubmenus.forEach((subMenu)=>{ + subMenu.classList.remove(openedClass); + }) } }); } else {