Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upHandle click on element (e.g. <span>) within an anchor <a> #103
Conversation
bear
added
bug
request
labels
Feb 22, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kamilogorek
Feb 24, 2015
Member
This'd take care of 1 level "deep" elements. What about those with more complex hierarchies and yet being a link? Think about "card tile" for example.
|
This'd take care of 1 level "deep" elements. What about those with more complex hierarchies and yet being a link? Think about "card tile" for example. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
lukekarrys
Feb 24, 2015
Contributor
I've solved this (and a few other element click quirks) in a separate module that we could include here: http://npmjs.org/local-links
I know @HenrikJoreteg has been using it for some stuff. Maybe he could chime in on whether it'd be a good candidate to use here?
|
I've solved this (and a few other element click quirks) in a separate module that we could include here: http://npmjs.org/local-links I know @HenrikJoreteg has been using it for some stuff. Maybe he could chime in on whether it'd be a good candidate to use here? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Looks nice and should resolve this issue once and for all. |
e2jk commentedFeb 21, 2015
Without this addition, in the example below the element that is clicked is the span, thus it has no
hostproperty. The link is thus considered not to be local, meaning thatapp.navigateis not used and the browser sends a newGETrequest to the server.Now if the element is not an anchor, it will check if the parent is one, and use that as the link instead.