Skip to content

Commit

Permalink
enable scrolling on localnav but not on popup
Browse files Browse the repository at this point in the history
  • Loading branch information
sharmrj committed Jan 13, 2025
1 parent 0724876 commit dc630cb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libs/blocks/global-navigation/global-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,18 +440,18 @@ class Gnav {

localNav.querySelector('.feds-localnav-title').addEventListener('click', () => {
localNav.classList.toggle('feds-localnav--active');
document.body.classList.toggle('disable-scroll');
// document.body.classList.toggle('disable-scroll');
const isActive = localNav.classList.contains('feds-localnav--active');
localNav.querySelector('.feds-localnav-title').setAttribute('aria-expanded', isActive);
localNav.querySelector('.feds-localnav-title').setAttribute('daa-ll', `${title}_localNav|${isActive ? 'close' : 'open'}`);
if (isActive) disableMobileScroll();
else enableMobileScroll();
// if (isActive) disableMobileScroll();
// else enableMobileScroll();
});

localNav.querySelector('.feds-localnav-curtain').addEventListener('click', (e) => {
trigger({ element: e.currentTarget, event: e, type: 'localNav-curtain' });
document.body.classList.remove('disable-scroll');
enableMobileScroll();
// document.body.classList.remove('disable-scroll');
// enableMobileScroll();
});
const promo = document.querySelector('.feds-promo-aside-wrapper');
if (promo) localNav.classList.add('has-promo');
Expand Down

0 comments on commit dc630cb

Please sign in to comment.