route
route copied to clipboard
Nested tags inside anchors break the global click listener.
Hi, i tried the example. it works.
but if I add an tag inside ,
"File not found: /one" message appear :(
This is what I changed
<a href="/one" title="Section One"> <img src="http://digital-photography-school.com/wp-content/uploads/2013/03/Acorn256.png"> </a>
<a href="/two" title="Section Two">Two</a>
thanks marco
It looks like the current implementation of the anchor click interceptor does not support nested elements inside the a
tag. A couple of workaround options:
- Use CSS
background
instead of nested image. - Add a custom click listener on the
img
tag that first doese.preventDefault();
and thenrouter.handle(hrefValueFromTheLink)
.
Reopening, since this is still an issue.