From d75a7faf245f0a9e9bcdab41315e7dcdaa76c61b Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 19 May 2026 02:09:53 +0000 Subject: feat(nav): collapse hamburger menu on scroll When the menu is open and the user scrolls, they have signalled they want to interact with content rather than the menu. Closes isMenuOpen on any scroll event alongside the existing isHeaderVisible recalculation in the same handler. --- src/routes/+layout.svelte | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/routes') diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index af8a0e3c..625f58b1 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -97,6 +97,8 @@ const handleScroll = () => { currentScrollPosition <= 100 || currentScrollPosition < previousScrollPosition; previousScrollPosition = currentScrollPosition; + + if (isMenuOpen) isMenuOpen = false; }; onMount(async () => { -- cgit v1.2.3