liferay/senna.js

Senna doesn't navigate correctly using a <a /> tag inside a <svg /> tag

interaminense opened this issue · 1 comments

Expected behaviour

There is a <a /> tag inside SVG and I hope that when I click the link, Senna can load the page in SPA.

Actual behaviour

Clicking on the link displays a javascript error in the console:
screen shot 2018-08-29 at 19 28 31

This happens because the type of the <a /> tag inside an SVG is different from the <a /> tag inside HTML and Senna expects a string instead of an SVGAnimatedString object:
screen shot 2018-08-29 at 19 27 20

Steps to reproduce

  1. Add a <a /> tag inside an SVG:

screen shot 2018-08-29 at 19 33 27

2. Click on the link to navigate with SPA;

Browsers affected

Shouldn't be working on all browsers

We're about to archive this repo and mark it as read-only. As explained here the Senna code base has been ingested into Liferay DXP itself in the form of the frontend-js-spa-web module, and we have migrated the v2.x history over into the liferay-frontend-projects monorepo so that we can keep our stuff together (and have uniform testing, linting, building etc) and will cut any necessary maintenance releases from there.

So as to clean out stale issues, I am closing anything that hasn't had any activity in the last year. If this is still relevant, would you mind opening an issue over there instead?