Minor but cumbersome issue using “Navbar 1” in Webflow on mobile (“hamburger mode”). Maybe not a common set up, but if any menu items are anchor links on the current page, instead of leading to other pages, the menu does not close when clicked.
Perhaps this has more to do with Webflow’s “Navbar Component” that is being used? Seems like the interactions are tied to it’s own custom triggers.
But curious if anyone else has run into a solution for this issue?
Yeah, this is more of a WF thing. Their NavBar doesn’t really handle this.
I may be wrong but its kinda not what the menu-component is for. It supposed to have have relevant links to all the pages as this it's purpose. therefore you may noticed the stated current when having the link of the current page checked in the status dropdown where you can edit hover status etc styles which in Webflow is only occurring in the child elements of the menu-button component. there is JS code behind it if you want to dive deeper into that
How can I see the JS code?
if you want to anchor an element or sections within the same the screen readers read the link as empty vs if you paste https: link instead with the url mywebsite.com/#service-1
only by Inspecting the published site or maybe Webflow will share it with you. I haven't tried to ask them yet, it may be a good idea to try actually 😉
ah
TLDR My main nav menu has a combo of page links as well as “Section” links to specific sections of the home page.
The behavior of these links is inconsistent depending on which page you’re currently on.
I want to keep the navbar as a component, so I don’t want unique elements on each page.
So my solution was to actually set up several link properties on my Component, and assign them to the nav menu items. That way, I can change the link properties on each page without breaking the Component usage.
It mostly works. There is a weird bug. If I’m in the editor, the links assigned to URLs always open in a new tab even if set not to in the current one. Thankfully, this does not cary over to the published site.
yeah Webflow handles section links differently and poorly unfortunately. I think the way you are handling it is actually pretty smart - might have to look into this more.