fix: Page reloads in Firefox when clicking some menu items (#2060)

* fix: Some context menu items result in page reload in Firefox

closes #1877

* fix: Display of sidebar link actions on hover
This commit is contained in:
Tom Moor 2021-04-23 12:25:15 -07:00 committed by GitHub
parent eb6acdae20
commit 3b696cfa9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,6 +66,7 @@ function SidebarLink({
}; };
return ( return (
<>
<Link <Link
$isActiveDrop={isActiveDrop} $isActiveDrop={isActiveDrop}
activeStyle={isActiveDrop ? activeDropStyle : activeStyle} activeStyle={isActiveDrop ? activeDropStyle : activeStyle}
@ -80,8 +81,9 @@ function SidebarLink({
> >
{icon && <IconWrapper>{icon}</IconWrapper>} {icon && <IconWrapper>{icon}</IconWrapper>}
<Label>{label}</Label> <Label>{label}</Label>
{menu && <Actions showActions={showActions}>{menu}</Actions>}
</Link> </Link>
{menu && <Actions showActions={showActions}>{menu}</Actions>}
</>
); );
} }
@ -109,6 +111,8 @@ const Actions = styled(EventBoundary)`
} }
&:hover { &:hover {
display: inline-flex;
svg { svg {
opacity: 0.75; opacity: 0.75;
} }
@ -145,9 +149,8 @@ const Link = styled(NavLink)`
background: ${(props) => props.theme.black05}; background: ${(props) => props.theme.black05};
} }
&:hover, &:hover + ${Actions},
&:active { &:active + ${Actions} {
> ${Actions} {
display: inline-flex; display: inline-flex;
svg { svg {