route icon indicating copy to clipboard operation
route copied to clipboard

Nested tags inside anchors break the global click listener.

Open marcog83 opened this issue 11 years ago • 2 comments

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

marcog83 avatar Apr 22 '13 15:04 marcog83

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:

  1. Use CSS background instead of nested image.
  2. Add a custom click listener on the img tag that first does e.preventDefault(); and then router.handle(hrefValueFromTheLink).

pavelgj avatar Apr 22 '13 16:04 pavelgj

Reopening, since this is still an issue.

justinfagnani avatar Apr 24 '13 16:04 justinfagnani