From fa6506ed5d47e11a4a74c96cec5371fe390bbbc4 Mon Sep 17 00:00:00 2001 From: Caleb Allen Date: Fri, 20 Feb 2026 13:33:16 -0500 Subject: [PATCH] selecting an album while having a dropdown open no longer scrolls to the top of the grid. --- frontend/src/components/cover-grid/cover-grid.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/cover-grid/cover-grid.ts b/frontend/src/components/cover-grid/cover-grid.ts index d4636eb..390bc42 100644 --- a/frontend/src/components/cover-grid/cover-grid.ts +++ b/frontend/src/components/cover-grid/cover-grid.ts @@ -605,11 +605,18 @@ export class CoverGrid extends LitElement { ) { if (this.skipOverlay) { // Lightweight exit: skip the - // overlay capture and scroll - // restore so the transition is - // instant. + // expensive overlay capture but + // still restore scroll position + // since the DOM restructure + // (split → single virtualizer) + // resets scrollTop. this.skipOverlay = false; + this.savedScrollTop = + this.computeAdjustedScrollTop(); + this.savedAlbumViewportOffset = null; this.splitMode = false; + this.needsScrollRestore = true; + this.showDropdownAfterRestore = false; } else { // Capture the raw split-mode scrollTop // before converting to single-mode coords.