Skip to content

fix(overflow-menu): elevate portal z-index to prevent click interception on mobile (#1433)#1444

Merged
steilerDev merged 1 commit into
betafrom
fix/1432-1433-invoice-deposits
May 17, 2026
Merged

fix(overflow-menu): elevate portal z-index to prevent click interception on mobile (#1433)#1444
steilerDev merged 1 commit into
betafrom
fix/1432-1433-invoice-deposits

Conversation

@steilerDev
Copy link
Copy Markdown
Owner

Summary

Fixed a mobile-specific bug where OverflowMenu portal-rendered items became unclickable due to z-index stacking context interception. The menu was rendered via createPortal to document.body with a low z-index (10), which allowed parent elements with position: relative (like .cardActions) to intercept clicks.

Changes

  • File: client/src/components/OverflowMenu/OverflowMenu.module.css
  • Change: Added z-index: var(--z-overlay) (50) to .menuFixed selector
  • Effect: Portal-rendered menus (usePortal=true) now use the overlay z-index tier instead of dropdown tier
  • Scope: Inline menus (usePortal=false) unaffected; retains z-index: var(--z-dropdown)

Root Cause

On mobile, the invoice deposits card layout renders with .cardActions { position: relative }, creating a stacking context. When the OverflowMenu portal (z-index: 10) rendered above the card, intermediate stacking contexts were intercepting pointer events, preventing clicks from reaching the menu items.

Solution

Elevated the z-index of portal-rendered menus to use --z-overlay (50), which is the semantic token for portal-rendered overlays that escape component bounds. This is above --z-dropdown (10) but below --z-modal (1000).

Testing

  • E2E test invoice-deposits.spec.ts:665 (Scenario 7) validates menu item clicks on mobile
  • CSS change is CSS-only; no TypeScript changes
  • No breaking changes; inline OverflowMenu usage unaffected

🤖 Generated with Claude Code

…ion on mobile

The OverflowMenu portal-rendered menu (z-index: 10) was being intercepted
by parent stacking contexts on mobile, making menu items unclickable. This
occurred when cardActions (.position: relative) created a stacking context
that sat above the low z-index portal menu.

Elevated .menuFixed from default z-index to var(--z-overlay) (50), which is
the semantic token for portal-rendered overlays that escape component bounds.
This ensures portal menus remain clickable regardless of page stacking contexts.

- .menu retains z-index: var(--z-dropdown) for inline mode
- .menuFixed now includes z-index: var(--z-overlay) via CSS override
- No breaking changes; inline menus unaffected

Fixes #1433 (mobile invoice deposits menu click timeout).

Co-Authored-By: Claude frontend-developer (Haiku 4.5) <noreply@anthropic.com>
@steilerDev steilerDev merged commit a5cda99 into beta May 17, 2026
27 of 30 checks passed
@steilerDev steilerDev deleted the fix/1432-1433-invoice-deposits branch May 17, 2026 13:10
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.6.0-beta.18 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant