From 02e4cbe6c99504dca322524b36e3d2f22d7243df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Ferreira?= Date: Wed, 8 Jan 2025 18:53:38 +0000 Subject: [PATCH] - Get Active SubItem using the a strong selector pointing to the specific to sub itens instead of children list; --- src/scripts/OutSystems/OSUI/Utils/Menu.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/scripts/OutSystems/OSUI/Utils/Menu.ts b/src/scripts/OutSystems/OSUI/Utils/Menu.ts index 1360c6e837..9a9da132bb 100644 --- a/src/scripts/OutSystems/OSUI/Utils/Menu.ts +++ b/src/scripts/OutSystems/OSUI/Utils/Menu.ts @@ -516,7 +516,13 @@ namespace OutSystems.OSUI.Utils.Menu { OSFramework.OSUI.Helper.Dom.ClassSelector(activeSubMenu, 'submenu-items') || OSFramework.OSUI.Helper.Dom.ClassSelector(activeSubMenu, 'osui-submenu__items'); - const activeSubMenuItem = subMenuItem.children[ActiveSubItem] as HTMLElement; + const activeSubMenuItem = subMenuItem.querySelectorAll( + '[' + + OSFramework.OSUI.Constants.A11YAttributes.Role.AttrName + + "='" + + OSFramework.OSUI.Constants.A11YAttributes.Role.MenuItem + + "']" + )[ActiveSubItem] as HTMLElement; if (activeSubMenuItem) { OSFramework.OSUI.Helper.Dom.Styles.AddClass(activeSubMenuItem, 'active'); }