Open gilleard opened 8 years ago
If you're using the xlink:href attribute for external svgs, like this:
xlink:href
<a class="spf-link" href="/"><svg><use xlink:href="sprite.svg#logo"></use></svg></a>
Then during clicks nav.getAncestorWithHref_ will return the use element, causing an error later on when assuming the href attribute is a string.
nav.getAncestorWithHref_
use
href
I've used css pointer-events to avoid the problem in my project but wanted to flag the issue.
pointer-events
If you're using the
xlink:href
attribute for external svgs, like this:<a class="spf-link" href="/"><svg><use xlink:href="sprite.svg#logo"></use></svg></a>
Then during clicks
nav.getAncestorWithHref_
will return theuse
element, causing an error later on when assuming thehref
attribute is a string.I've used css
pointer-events
to avoid the problem in my project but wanted to flag the issue.