mirror of
https://github.com/outline/outline.git
synced 2026-11-22 05:51:43 +03:00
fix: Keep sidebar row active while the add menu is open
This commit is contained in:
2 files changed
+6
-3
No files matched your search
@@ -6,9 +6,11 @@ import NudeButton from "~/components/NudeButton";
|
||||
/**
|
||||
* Selector list matching a sidebar row that is hovered, pressed, or has one
|
||||
* of its menus open. Radix marks the open trigger with `data-state="open"`:
|
||||
* the row itself for a context menu, a descendant button for a dropdown.
|
||||
* the row itself for a context menu, a descendant button for a dropdown. A
|
||||
* tooltip on a dropdown trigger replaces its `data-state`, so an expanded menu
|
||||
* trigger is also matched.
|
||||
*/
|
||||
export const hoveredOrMenuOpen = `&:hover, &:active, &[data-state="open"], &:has([data-state="open"])`;
|
||||
export const hoveredOrMenuOpen = `&:hover, &:active, &[data-state="open"], &:has([data-state="open"]), &:has([aria-haspopup="menu"][aria-expanded="true"])`;
|
||||
|
||||
/**
|
||||
* Trailing action buttons for a sidebar row. Hidden until the row reveals
|
||||
|
||||
@@ -368,7 +368,8 @@ const Link = styled.a<{
|
||||
}
|
||||
|
||||
&: ${hover},
|
||||
&:has([data-state="open"]) {
|
||||
&:has([data-state="open"]),
|
||||
&:has([aria-haspopup="menu"][aria-expanded="true"]) {
|
||||
${HiddenDisclosure} {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user