Skip to content

NavigationMenu items disappear when sidebar collapsed with tooltip enabled #6096

@gawst

Description

@gawst

Environment

MacBook Air M2
Memory: 8 GB
macOS: 15.2 (24C101)

Is this bug related to Nuxt or Vue?

Vue

Package

v4.x

Version

v4.4.0

Reproduction

Reproduction

  • Use UDashboardSidebar with collapsible, a vertical UNavigationMenu, and the tooltip prop enabled.
  • Include at least one active/selected navigation item.
  • Collapse the sidebar.
  • Dashboard link disappears unless the page is refreshed.
<script setup lang="ts">
import type { NavigationMenuItem } from '@nuxt/ui';

const items: NavigationMenuItem[][] = [
  [
    {
      label: 'Dashboard',
      icon: 'i-lucide-house',
      to: '/dashboard',
      // tooltip: { text: 'Dashboard' }
    },
    {
      label: 'Organizations',
      icon: 'i-lucide-inbox',
      to: '/org',
      // tooltip: { text: 'Organizations' }
    },
  ],
];
</script>

<template>
  <UDashboardSidebar collapsible>
    <template #default="{ collapsed }">
      <UNavigationMenu
        :collapsed="collapsed"
        :items="items[0]"
        orientation="vertical"
        tooltip
      />
    </template>
  </UDashboardSidebar>
</template>

Both global tooltip and per-item tooltip produce the same broken behavior.

Description

When using a vertical UNavigationMenu inside UDashboardSidebar with the sidebar collapsed and tooltip enabled, one of the menu links (e.g., Dashboard) disappears or does not render correctly until a page refresh. If the currently selected item is an item with children (e.g., Organizations), collapsing the sidebar causes the navigation items to break and become visually missing or broken.

This only happens when the tooltip prop is enabled (even on a per-item basis). Removing tooltip entirely fixes the problem.

  • One or more navigation items disappear (e.g. Dashboard) when the sidebar collapses.
  • Forced page refresh restores the missing item.
  • The issue is reproducible only with tooltip enabled.

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds reproductiontriageAwaiting initial review and prioritizationv4#4488

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions