diff --git a/src/components/NcAppNavigationItem/NcAppNavigationItem.vue b/src/components/NcAppNavigationItem/NcAppNavigationItem.vue index 4847066cfd..9ff895b892 100644 --- a/src/components/NcAppNavigationItem/NcAppNavigationItem.vue +++ b/src/components/NcAppNavigationItem/NcAppNavigationItem.vue @@ -210,7 +210,7 @@ Just set the `pinned` prop. }" class="app-navigation-entry-wrapper"> @@ -226,11 +226,11 @@ Just set the `pinned` prop. class="app-navigation-entry-link" :aria-description="ariaDescription" :aria-expanded="opened.toString()" - :href="href || '#'" + :href="href || routerLinkHref || '#'" :target="isExternal(href) ? '_blank' : ''" :title="title || nameTitleFallback" @blur="handleBlur" - @click="(event) => onClick(event, navigate)" + @click="onClick($event, navigate, routerLinkHref)" @focus="handleFocus" @keydown.tab.exact="handleTab"> @@ -643,10 +643,14 @@ export default { }, // forward click event - onClick(event, navigate) { + onClick(event, navigate, routerLinkHref) { // Navigate is only defined if it is a router-link navigate?.(event) this.$emit('click', event) + // Prevent default link behaviour if it's a router-link + if (routerLinkHref) { + event.preventDefault() + } }, // Edition methods diff --git a/src/components/NcListItem/NcListItem.vue b/src/components/NcListItem/NcListItem.vue index 8c5931768e..dd40067ff0 100644 --- a/src/components/NcListItem/NcListItem.vue +++ b/src/components/NcListItem/NcListItem.vue @@ -200,16 +200,15 @@