Skip to content

fix: keep context menu inside viewport near bottom/right edge (#310) - #478

Open
Radexito wants to merge 1 commit into
devfrom
fix/310-context-menu-flip
Open

fix: keep context menu inside viewport near bottom/right edge (#310)#478
Radexito wants to merge 1 commit into
devfrom
fix/310-context-menu-flip

Conversation

@Radexito

@Radexito Radexito commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Fixes #310

Problem

Right-clicking a row near the bottom/right edge of the window rendered the context menu partially or fully off-screen — the position was clamped, but the menu's own height/width was never accounted for.

Fix

After the menu renders, measure it (getBoundingClientRect) and nudge it up/left by exactly the viewport overflow (8px margin), so it always stays inside the window. Applies to both context menus:

  • MusicLibrary.jsx (track menu; re-measures on drill/submenu content change)
  • FileExplorerView.jsx (explorer menu)

The existing flipLeft/flipUp submenu direction logic is untouched.

Test

  • npm run lint (renderer): 0 errors.

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