Preserve sidebar item active color when showing context menu

This commit is contained in:
Gregory Schier
2026-01-03 15:07:29 -08:00
parent c75d6b815e
commit 58bf55704a
2 changed files with 12 additions and 1 deletions

View File

@@ -679,7 +679,8 @@ function TreeInner<T extends { id: string }>(
className={classNames(
'[&_.tree-item.selected_.tree-item-inner]:text-text',
'[&:focus-within]:[&_.tree-item.selected]:bg-surface-active',
'[&:not(:focus-within)]:[&_.tree-item.selected]:bg-surface-highlight',
'[&:not(:focus-within)]:[&_.tree-item.selected:not([data-context-menu-open])]:bg-surface-highlight',
'[&_.tree-item.selected[data-context-menu-open]]:bg-surface-active',
// Round the items, but only if the ends of the selection.
// Also account for the drop marker being in between items
'[&_.tree-item]:rounded-md',