Skip to content

Conversation

metonym
Copy link
Collaborator

@metonym metonym commented Oct 16, 2025

Fixes #1847

This fixes submenu positioning on narrow viewports by improving the horizontal constraint logic in ContextMenuOption.svelte.

Currently, the submenu overflows the viewport on small screens because it only checks if there's space on the right side using an incorrect reference point (menuOffsetX). The fix now uses the actual submenu width to check both right and left viewport boundaries, falling back to the viewport edge when the submenu would overflow on both sides.

This fix is consistent with the React implementation.


Before

Screenshot 2025-10-16 at 2 53 01 PM

After

Screenshot 2025-10-16 at 2 53 34 PM

@metonym metonym merged commit 1933c0b into master Oct 16, 2025
7 checks passed
@metonym metonym deleted the fix-contextmenu-viewport branch October 16, 2025 22:43
@metonym
Copy link
Collaborator Author

metonym commented Oct 19, 2025

Fixed in v0.89.8

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.

ContextMenu submenu position goes out of screen on small screen

1 participant