mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-12 07:46:31 +02:00
Update web_src/js/features/file-view.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: hamkido <hamki.do2000@gmail.com>
This commit is contained in:
parent
860afc51d3
commit
5896a80421
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user