Skip to content

Commit

Permalink
Apply width of active gnav element after bolding of text is done (#3678)
Browse files Browse the repository at this point in the history
Apply width after bolding of text is done
  • Loading branch information
bandana147 authored Feb 19, 2025
1 parent 30374d3 commit f41ff37
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libs/blocks/global-navigation/utilities/menu/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,14 +353,13 @@ const decorateMenu = (config) => logErrorFor(async () => {
config.template.classList.remove(selectors.deferredActiveNavItem.slice(1));
};

config.template.classList.add(selectors.activeNavItem.slice(1));
if (isDesktop.matches) {
config.template.style.width = `${config.template.offsetWidth}px`;
config.template.classList.add(selectors.deferredActiveNavItem.slice(1));
isDesktop.addEventListener('change', resetActiveState, { once: true });
window.addEventListener('feds:navOverflow', resetActiveState, { once: true });
}

config.template.classList.add(selectors.activeNavItem.slice(1));
}

asyncDropDownCount += 1;
Expand Down

0 comments on commit f41ff37

Please sign in to comment.