mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
fix: Hover state is lost on sidebar items when context menu is open (#11054)
* fix: Unread badge position * fix: Hover state with active context menu
This commit is contained in:
@@ -87,7 +87,7 @@ function NotificationListItem({ notification, onNavigate }: Props) {
|
||||
/>
|
||||
)}
|
||||
</Flex>
|
||||
{notification.viewedAt ? null : <UnreadBadge style={{ right: 12 }} />}
|
||||
{notification.viewedAt ? null : <UnreadBadge />}
|
||||
</Container>
|
||||
</StyledLink>
|
||||
</ContextMenu>
|
||||
|
||||
@@ -107,7 +107,7 @@ function SidebarLink(
|
||||
|
||||
const unreadStyle = React.useMemo(
|
||||
() => ({
|
||||
right: -12,
|
||||
right: -20,
|
||||
}),
|
||||
[]
|
||||
);
|
||||
@@ -165,7 +165,6 @@ function SidebarLink(
|
||||
ref={ref}
|
||||
{...rest}
|
||||
>
|
||||
{" "}
|
||||
<ContextMenu action={contextAction} ariaLabel={t("Link options")}>
|
||||
<Content>
|
||||
{hasDisclosure && (
|
||||
@@ -243,7 +242,8 @@ const Link = styled(NavLink)<{
|
||||
$disabled?: boolean;
|
||||
}>`
|
||||
&:hover,
|
||||
&:active {
|
||||
&:active,
|
||||
&:has([data-state="open"]) {
|
||||
--background: ${s("sidebarHoverBackground")};
|
||||
}
|
||||
|
||||
|
||||
@@ -8,5 +8,5 @@ export const UnreadBadge = styled.div`
|
||||
border-radius: 8px;
|
||||
align-self: center;
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
right: 12px;
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user