liferay/senna.js

Senna doesn't respect link target attribute

brunobasto opened this issue · 6 comments

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

  1. Add a link where the href attribute is routed by senna.
  2. Add a target="_blank" to that link.
  3. Click on that link

Browsers affected

All major browsers.

+1, we had this bug this morning, had to add data-senna-off to workaround.

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

Sure, @brunobasto. I'm going to take a look.

Hey @fernandosouza, what's the status on this one?

Hey, @brunobasto. I'll check if I missed anything and I'm going to send a PR.