Senna doesn't respect link target attribute
brunobasto opened this issue · 6 comments
brunobasto commented
Expected behaviour
When clicking on a link with target="_blank", it's expected that the link will open on a new tab.
Actual behavior
Senna ignores the attribute and navigates to the link on the same tab.
Steps to reproduce
- Add a link where the href attribute is routed by senna.
- Add a target="_blank" to that link.
- Click on that link
Browsers affected
All major browsers.
zenorocha commented
+1, we had this bug this morning, had to add data-senna-off
to workaround.
brunobasto commented
@fernandosouza, can you are a look at this when you have some time? It's should be enough to change this line https://github.com/liferay/senna.js/blob/master/src/app/App.js#L101 to not track links with the target attribute set.
fernandosouza commented
Sure, @brunobasto. I'm going to take a look.
brunobasto commented
Hey @fernandosouza, what's the status on this one?
eduardolundgren commented
LGTM
fernandosouza commented
Hey, @brunobasto. I'll check if I missed anything and I'm going to send a PR.