Skip to content

Commit

Permalink
Merge pull request #1009 from OutSystems/ROU-11521
Browse files Browse the repository at this point in the history
ROU-11521: the behavior of "ActiveSubMenu" differs in the OutSystems UI different versions
  • Loading branch information
JoaoFerreira-FrontEnd authored Jan 9, 2025
2 parents 7fa2a5f + 02e4cbe commit 97f64c6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/scripts/OutSystems/OSUI/Utils/Menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down

0 comments on commit 97f64c6

Please sign in to comment.