mirror of
https://github.com/flarum/framework.git
synced 2025-02-22 22:07:57 +08:00
Stop propagation when clicking on tag child
This commit is contained in:
commit
670218d267
@ -45,7 +45,10 @@ export default class TagsPage extends Component {
|
|||||||
? (
|
? (
|
||||||
<div className="TagTile-children">
|
<div className="TagTile-children">
|
||||||
{children.map(child =>
|
{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()}
|
{child.name()}
|
||||||
</a>
|
</a>
|
||||||
)}
|
)}
|
||||||
|
@ -62,9 +62,6 @@
|
|||||||
&:hover {
|
&:hover {
|
||||||
background: fade(#000, 5%);
|
background: fade(#000, 5%);
|
||||||
}
|
}
|
||||||
&:active {
|
|
||||||
background: fade(#000, 15%);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.TagTile-name {
|
.TagTile-name {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
@ -95,7 +92,7 @@
|
|||||||
line-height: 21px;
|
line-height: 21px;
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
|
|
||||||
&, &:hover, &:active {
|
&, &:hover {
|
||||||
background: fade(#000, 10%);
|
background: fade(#000, 10%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user