From 6a5ea3b2f371c8c3270966f6571d5e8e1cc9ab1f Mon Sep 17 00:00:00 2001 From: hamkido Date: Mon, 26 Jan 2026 17:17:15 +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, 2 insertions(+), 2 deletions(-) diff --git a/web_src/js/features/file-view.ts b/web_src/js/features/file-view.ts index de1d00e49c..9072465303 100644 --- a/web_src/js/features/file-view.ts +++ b/web_src/js/features/file-view.ts @@ -170,8 +170,8 @@ function initSidebarToggle(elFileView: HTMLElement): void { const fileHeader = elFileView.querySelector('.file-header'); const segment = elFileView.querySelector('.ui.bottom.segment'); if (fileHeader && segment) { - // Use many thresholds to get fine-grained position updates during scroll - const thresholds = Array.from({length: 101}, (_, i) => i / 100); + // Use a small set of thresholds to get periodic position updates during scroll + const thresholds = [0, 0.25, 0.5, 0.75, 1]; const positionObserver = new IntersectionObserver(() => { updatePosition(); }, {threshold: thresholds});