diff --git a/src/components/NcAppNavigationItem/NcAppNavigationItem.vue b/src/components/NcAppNavigationItem/NcAppNavigationItem.vue index e6169da168..123cb19ba0 100644 --- a/src/components/NcAppNavigationItem/NcAppNavigationItem.vue +++ b/src/components/NcAppNavigationItem/NcAppNavigationItem.vue @@ -696,6 +696,12 @@ export default { onClick(event, navigate, routerLinkHref) { // Always forward native event this.$emit('click', event) + + // If no links are defined, and collapsing is enabled, we want it to collapse + if (this.to === null && this.href === null && this.collapsible === true) { + this.toggleCollapse() + event.preventDefault() + } // Do not navigate with control keys - it is opening in a new tab if (event.metaKey || event.altKey || event.ctrlKey || event.shiftKey) { return