Fixed mobile scrolling issues

fixes #12

- added background color to the mobile menu actions
- disabled root scrolling when the mobile menu is opened which fixes the duplicate scrolling issue
This commit is contained in:
Sodbileg Gansukh
2024-01-03 12:20:49 +07:00
parent d046267a3a
commit c060944364
6 changed files with 7 additions and 4 deletions

View File

@@ -7,8 +7,10 @@
burger.addEventListener('click', function () {
if (!navigation.classList.contains('is-open')) {
navigation.classList.add('is-open');
document.documentElement.style.overflowY = 'hidden';
} else {
navigation.classList.remove('is-open');
document.documentElement.style.overflowY = null;
}
});
})();