Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bradbeattie opened this issue Apr 3, 2017 · 1 comment

Comments

@bradbeattie
Copy link

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".

@posva
Copy link
Member

posva commented Apr 4, 2017

Hey,the most recent version of vue-router doesn't include that fix yet but it was fixed in #1290

@posva posva closed this as completed Apr 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants