From d5e6e3449a9ad89c4bc1d05a225549d1d3dfc88a Mon Sep 17 00:00:00 2001 From: Gaya KACI <163902005+kacigaya@users.noreply.github.com> Date: Wed, 7 Oct 2026 08:48:43 +0000 Subject: [PATCH] fix(web): fit context menus to viewport height The fallback menu capped its list at min(24rem, 70vh), so the 13-item thread menu scrolled even in tall windows. --- apps/web/src/contextMenuFallback.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/web/src/contextMenuFallback.ts b/apps/web/src/contextMenuFallback.ts index db14ed8c860c..1ba2be270eee 100644 --- a/apps/web/src/contextMenuFallback.ts +++ b/apps/web/src/contextMenuFallback.ts @@ -303,10 +303,12 @@ export function showContextMenuFallback( menu.dataset.level = String(level); const inner = document.createElement("div"); + // Fit the viewport (minus clampMenuPosition's 4px margins) so menus only + // scroll when the window is shorter than the menu itself. inner.className = - "max-h-[min(24rem,70vh)] min-w-0 max-w-sm overflow-y-auto overflow-x-hidden p-1"; + "max-h-[calc(100vh-0.5rem)] min-w-0 max-w-sm overflow-y-auto overflow-x-hidden p-1"; inner.style.cssText = - "max-height:min(24rem,70vh);min-width:0;max-width:24rem;overflow-x:hidden;overflow-y:auto;padding:0.25rem;"; + "max-height:calc(100vh - 0.5rem);min-width:0;max-width:24rem;overflow-x:hidden;overflow-y:auto;padding:0.25rem;"; for (const item of entries) { if (item.separatorBefore === true && inner.children.length > 0) {