You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have anchors placed inside MenuBar, in html it looks like this:
<vaadin-menu-bar-list-box theme="icon menu theme-color" role="menu" aria-orientation="vertical">
<div aria-haspopup="false" theme="icon menu theme-color">
<a href="link">
Link
</a>
</div>
</vaadin-menu-bar-list-box>
When I click on such link, router doesn't catch it and page fully reloads. I tried to work around it with preventDefault() on click event and firing router event:
Regular anchor element behaves this way in Vaadin, it causes a page reload. If you want router to catch it, add attribute router-link to the anchor element.
Description of the bug
I have anchors placed inside MenuBar, in html it looks like this:
When I click on such link, router doesn't catch it and page fully reloads. I tried to work around it with
preventDefault()
on click event and firing router event:It did nothing, it worked only when I changed replace to true, which isn't what I want.
Expected behavior
Clicking on
<a>
inside menu-bar will work the same as other anchors do.Minimal reproducible example
Function to generate such element:
Versions
The text was updated successfully, but these errors were encountered: