Skip to content

NavigationMenu: NavigationMenuItem.target seems to be ignored #5012

@rijenkii

Description

@rijenkii

Environment

  • Operating System: Linux
  • Node Version: v20.19.1
  • Nuxt Version: -
  • CLI Version: 3.28.0
  • Nitro Version: -
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Is this bug related to Nuxt or Vue?

Vue

Package

v3.x

Version

v3.3.4

Reproduction

https://stackblitz.com/edit/vitejs-vite-9khbefry?file=src/App.vue (please open in blink-based browsers, something in the reproduction webcontainer really does not want to run in firefox)

<template>
  <UApp>
    <UNavigationMenu
      :items="[
        {
          label: 'Nuxt UI',
          href: 'https://ui.nuxt.com',
          target: '_self',
        },
      ]"
    />
  </UApp>
</template>

Description

NavigationMenu is passed an item with a set href and target set to _self. Rendered <a> ignores passed target and sets it to _blank:

Image

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageAwaiting initial review and prioritizationv3#1289

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions