From 5896a80421c93c685b2f9e9ecbde67c1ba4485f4 Mon Sep 17 00:00:00 2001 From: hamkido Date: Mon, 26 Jan 2026 17:18:37 +0800 Subject: [PATCH] Update web_src/js/features/file-view.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: hamkido --- web_src/js/features/file-view.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web_src/js/features/file-view.ts b/web_src/js/features/file-view.ts index 91699301fa..70db3c1db1 100644 --- a/web_src/js/features/file-view.ts +++ b/web_src/js/features/file-view.ts @@ -77,7 +77,9 @@ function updateSidebarPosition(elFileView: HTMLElement, sidebar: HTMLElement): v // Dynamically calculate max-height so sidebar doesn't extend below segment bottom const availableHeight = Math.max(0, segmentRect.bottom - topPos); - const cssMaxHeight = window.innerHeight - 140; // Match CSS calc(100vh - 140px) + // 140px accounts for fixed layout chrome (header, spacing, etc.) and must match CSS: calc(100vh - 140px) + const cssMaxHeightOffset = 140; + const cssMaxHeight = window.innerHeight - cssMaxHeightOffset; const maxHeight = Math.min(availableHeight, cssMaxHeight); // Hide sidebar if available height is too small