From 792e08ad03ccdd69fde7e8404dc287eb66f74963 Mon Sep 17 00:00:00 2001 From: sefaria Date: Mon, 29 Jun 2026 23:01:41 +0200 Subject: [PATCH] prevent scroll on menu toggle --- js/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index 124beb3..da2f9d0 100644 --- a/js/app.js +++ b/js/app.js @@ -16,7 +16,7 @@ if (menuToggleLabel) menuToggleLabel.textContent = 'Close'; mobileMenu.setAttribute('aria-hidden', 'false'); siteContent.setAttribute('inert', ''); - menuToggle.focus(); + menuToggle.focus({ preventScroll: true }); } function closeMenu() { @@ -27,7 +27,7 @@ if (menuToggleLabel) menuToggleLabel.textContent = 'Menu'; mobileMenu.setAttribute('aria-hidden', 'true'); siteContent.removeAttribute('inert'); - menuToggle.focus(); + menuToggle.focus({ preventScroll: true }); window.setTimeout(() => { if (!body.classList.contains('menu-open')) {