I’m running into a strange issue with the mobile navigation on my site. On tablet and mobile breakpoints everything works fine in Designer and preview, but once the site is published, the menu opens and then closes by itself after about a second.
The desktop version works fine.
It also works fine if I test the mobile breakpoint on desktop with Chrome’s device toolbar.
The problem only happens on actual phones and tablets (tested on iPhone and Android).
I already checked for duplicate webflow.js scripts, removed extra custom code, and tried publishing again — no luck. The .w–open class is added and then removed immediately when I tap the hamburger icon.
Does anyone know what might cause this? Or how to stop the nav from auto-closing on mobile?
The navbar menu button (hamburger menu) on tablet and mobile breakpoints should function as a toggle - expanding when clicked and only collapsing when clicked again. If you’re experiencing unexpected auto-closing behavior on your published site, here are some common solutions:
Make sure your navbar interactions are properly set up in the Designer. Check that no additional interactions or triggers are accidentally applied to the navbar or menu button that might cause it to close automatically. Also verify that your navbar components are properly nested and that the menu button is correctly linked to the nav menu element.
For optimal mobile navigation behavior, you can also try clearing your project cache and republishing the site. If you’re using any custom code or scripts, ensure they’re not interfering with the default navbar functionality.
Hopefully this helps! If you still need assistance, please reply here so somebody from the community can help.