@devries-cameron20 / t3code Mirror · read-only / commits / 63eaa79242
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 23, 14:15 UTC

fix(web): context menus no longer scroll when they fit the window (#16776)

Gaya KACI committed Oct 12, 2026 at 03:12 UTC 63eaa79242ccb591b7933335cfb758d065952f53
1 file changed +4 -2
apps/web/src/contextMenuFallback.ts
+4 -2
@@ -303,10 +303,12 @@ export function showContextMenuFallback<T extends string>(
303 menu.dataset.level = String(level);
304
305 const inner = document.createElement("div");
306 + // Fit the viewport (minus clampMenuPosition's 4px margins) so menus only
307 + // scroll when the window is shorter than the menu itself.
308 inner.className =
307 - "max-h-[min(24rem,70vh)] min-w-0 max-w-sm overflow-y-auto overflow-x-hidden p-1";
309 + "max-h-[calc(100vh-0.5rem)] min-w-0 max-w-sm overflow-y-auto overflow-x-hidden p-1";
310 inner.style.cssText =
309 - "max-height:min(24rem,70vh);min-width:0;max-width:24rem;overflow-x:hidden;overflow-y:auto;padding:0.25rem;";
311 + "max-height:calc(100vh - 0.5rem);min-width:0;max-width:24rem;overflow-x:hidden;overflow-y:auto;padding:0.25rem;";
312
313 for (const item of entries) {
314 if (item.separatorBefore === true && inner.children.length > 0) {