Stop propagation when clicking on tag child

This commit is contained in:
Toby Zerner 2015-07-22 16:01:24 +09:30
commit 670218d267
2 changed files with 5 additions and 5 deletions

View File

@ -45,7 +45,10 @@ export default class TagsPage extends Component {
? (
<div className="TagTile-children">
{children.map(child =>
<a href={app.route.tag(child)} config={m.route} onclick={e => e.stopPropagation()}>
<a href={app.route.tag(child)} config={function(element, isInitialized) {
$(element).on('click', e => e.stopPropagation());
m.route.apply(this, arguments);
}}>
{child.name()}
</a>
)}

View File

@ -62,9 +62,6 @@
&:hover {
background: fade(#000, 5%);
}
&:active {
background: fade(#000, 15%);
}
}
.TagTile-name {
font-size: 20px;
@ -95,7 +92,7 @@
line-height: 21px;
opacity: 0.5;
&, &:hover, &:active {
&, &:hover {
background: fade(#000, 10%);
}