Skip to content

Conversation

Copy link

Copilot AI commented Nov 11, 2025

Description

Mobile hamburger menu persisted after clicking navigation links, obscuring the target content. Menu now closes automatically on navigation.

Changes:

  • Added handleNavClick callback to close menu on link interaction
  • Refactored navItems to accept isMobile parameter for conditional click handling
  • Applied close behavior only to mobile menu, preserving desktop navigation semantics
const handleNavClick = () => {
  setIsMenuOpen(false);
};

const navItems = (isMobile: boolean = false) => (
  <>
    <Link href="/#contact" onClick={isMobile ? handleNavClick : undefined}>
      {getLocalizedElement("navbar_contact", language)}
    </Link>
    {/* ... */}
  </>
)

Milestones

Improves mobile UX for primary navigation flow.

Resources

N/A

Test Plan

Before: Menu remains open after clicking section link, blocking view of target content.

After: Menu dismisses on link click, revealing navigated section immediately.

Before - menu stays open
After - menu closes on navigation

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: node /home/REDACTED/work/website/website/frontend/node_modules/.bin/next build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Mobile menu remains open after navigating to a section</issue_title>
<issue_description>Describe the bug
On mobile viewports, when the hamburger menu is open and a user clicks a link to navigate to a page section, the navigation succeeds, but the menu overlay remains open. The user is forced to manually close the menu to see the content they just navigated to.

To Reproduce

  1. Navigate to the site on a mobile device (or using mobile emulation in browser dev tools).
  2. Tap the hamburger icon to open the main navigation menu.
  3. Tap on any section button.
  4. Observe that the page correctly scrolls to the corresponding section.
  5. Observe that the navigation menu remains open, covering the screen.

Expected behavior
When a user clicks a navigation link from within the hamburger menu, the menu should automatically close as it navigates the user to the selected section.

Before clicking on a section After clicking on a section
Image Image

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix mobile menu not closing after navigation Close mobile menu on navigation link click Nov 11, 2025
Copilot AI requested a review from hanrodz November 11, 2025 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile menu remains open after navigating to a section

2 participants