Skip to content

target="_blank" doesn't trigger if <router-link> contains child elements (e.g. <span>) #1303

Closed
@bradbeattie

Description

@bradbeattie

I've confirmed that this happens in the most recent version of vue and vue-router.

const target = e.currentTarget.getAttribute('target')
if (/\b_blank\b/i.test(target)) return

The problem is that this block of code isn't necessarily testing the generated tag due to the use of "currentTarget".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions