Skip to content

Conversation

Barbapapazes
Copy link
Contributor

@Barbapapazes Barbapapazes commented Aug 14, 2025

Hello 👋,

This PR fixes a bug where the following button:

<template>
  <UButton
    href="/admin"
    target="_blank"
  />
</template>

triggers an Inertia request, opening the link in an Inertia modal instead of a new tab.

This happens because a blank target is not treated as an external link, and Inertia ignores the target prop. As a result, Inertia fetches the URL, returns HTML, and displays it in the modal.

Copy link

pkg-pr-new bot commented Aug 14, 2025

npm i https://pkg.pr.new/@nuxt/ui@4746

commit: 6595275

@benjamincanac benjamincanac changed the title fix(Inertia): target blank flag links as external fix(Link): ensure target _blank is flagged as external for Inertia Aug 14, 2025
@benjamincanac benjamincanac merged commit 520b277 into nuxt:v3 Aug 14, 2025
6 checks passed
@benjamincanac benjamincanac added the v3 #1289 label Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 #1289
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants