Skip to content

Fix context menus rendering behind floating sidebar toolbar#580

Open
Redth wants to merge 1 commit intomainfrom
fix-menu-zindex
Open

Fix context menus rendering behind floating sidebar toolbar#580
Redth wants to merge 1 commit intomainfrom
fix-menu-zindex

Conversation

@Redth
Copy link
Copy Markdown
Collaborator

@Redth Redth commented Apr 10, 2026

Problem

Context menus (session right-click, group menu, header overflow) render behind the floating sidebar toolbar buttons (New, Manual sort, refresh, filter chips).

Root Cause

Multiple positioned elements with explicit z-index values create stacking contexts that trap descendant position: fixed menus — even though the menus have z-index: 10000, they can't escape a parent stacking context with a lower z-index.

Fix

  • Session/group context menus: Add has-open-menu CSS class to sidebar-content when any menu is open. Collapse stacking contexts on toolbar elements (sidebar-top-tools, sidebar-compose-panel, sidebar-organize-shell-compact, sidebar-support-fab) to z-index: auto — buttons stay visible but the menu paints on top.
  • Header overflow menu: Use :has() to bump .sidebar-header from z-index 3 → 50 when the overflow is hovered/focused.
  • Cleanup: Remove unnecessary z-index: 2 from .session-actions.

Collapse stacking contexts on sidebar toolbar elements when a session
or group context menu is open, so the position:fixed menu (z-index:10000)
can paint above everything. Also bump sidebar-header z-index when the
header overflow menu is active.

Three changes:
- Remove unnecessary z-index:2 from .session-actions
- Add has-open-menu class to sidebar-content, collapse stacking contexts
  on toolbar/filter/compose/support elements via z-index:auto
- Bump .sidebar-header z-index to 50 when header overflow is hovered/focused

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant