Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Navbar Mobile Menu Can Not Be Opened #4345

Open
Th3Vladimir opened this issue Dec 12, 2024 · 14 comments · Fixed by #4406
Open

[BUG] - Navbar Mobile Menu Can Not Be Opened #4345

Th3Vladimir opened this issue Dec 12, 2024 · 14 comments · Fixed by #4406
Assignees
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working

Comments

@Th3Vladimir
Copy link

NextUI Version

2.6.8

Describe the bug

The mobile menu on the navbar cannot be opened. This issue is reproducible on the official documentation site.

Your Example Website or App

https://nextui.org/docs/components/navbar#with-menu

Steps to Reproduce the Bug or Issue

  1. Go to NextUI Navbar Documentation.
  2. Scroll down to With Menu section.
  3. Move the slider, until the "page" navbar displays the hamburger menu (mobile navbar).
  4. Attempt to open the navbar menu.

Expected behavior

I expected the mobile menu to open and display the links, but the menu flickers and does not stay open.

Screenshots or Videos

NextUI-mobile-navbar-menu-bug.mp4

Operating System Version

Windows 11, Android 14

Browser

Chrome

Copy link

linear bot commented Dec 12, 2024

@wingkwong
Copy link
Member

From my side, it works fine but i'm using Mac + Chrome tho.

@oliverpechey
Copy link

I'm getting the same on Windows 11 and Chrome Version 131.0.6778.109

@wingkwong wingkwong added 🐛 Type: Bug Something isn't working 📦 Scope : Components Related to the components labels Dec 13, 2024
@wingkwong
Copy link
Member

Able to reproduce on Windows with Microsoft Edge.

@ngodacthien
Copy link

Mac And Chrome + Safari have same issue.
But in mobile Safari dont have.

@newguy123-creator
Copy link

newguy123-creator commented Dec 16, 2024

I see the same BUG in their own site, and also my own...
tried on Windows 10 with both Chrome and Firefox
the hamburger menu doesnt open

@newguy123-creator
Copy link

newguy123-creator commented Dec 18, 2024

Weridly, the Pro version of this works just fine. So not sure why would the Pro version work and the regular one not...

@amigoimmigration
Copy link

how to fix any one

@newguy123-creator
Copy link

this appears to still not be fixed. Or at least not fully
Before, the menu did not open AT ALL
now, I have to click the menu 2 times before it opens

@wingkwong wingkwong reopened this Jan 7, 2025
@wingkwong
Copy link
Member

@macci001 please follow up

@Natanael-Exe
Copy link

Natanael-Exe commented Jan 13, 2025

I fixed it by removing onMenuOpenChange={setIsMenuOpen} from Navbar component and adding the press event handler directly to the NavbarMenuToggle component like this:

<NavbarMenuToggle
onPress={() => setIsMenuOpen(!isMenuOpen)}
aria-label={isMenuOpen ? "Close menu" : "Open menu"}
/>

@vaclavkozak
Copy link

For me it's not working even after removing onMenuOpenChange from the Navbar. :/ I tries upgrading to 2.6.14, but it still doesn't work.

@newguy123-creator
Copy link

newguy123-creator commented Jan 22, 2025

For me it's not working even after removing onMenuOpenChange from the Navbar. :/ I tries upgrading to 2.6.14, but it still doesn't work.

yeah fro me its still broken too
after the 2 clicks, it opens with 1 click, but only if I dont resize the window. If I resize, then again it needs 2 clicks

@vaclavkozak
Copy link

For me it's not working even after removing onMenuOpenChange from the Navbar. :/ I tries upgrading to 2.6.14, but it still doesn't work.

yeah fro me its still broken too after the 2 clicks, it opens with 1 click, but only if I dont resize the window. If I resize, then again it needs 2 clicks

Well, for me it doesn't work at all. Not even after multiple clicks. It just "twitches" on the side of the page and immediately disappears. No error in the console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants