fix(frontend): make the grid actually follow keyboard focus
deploy / deploy (push) Successful in 20s

The previous attempt wrote scrollContainer.scrollTop, but <main> isn't the
scroll element here (the window/document scrolls, as getScroller and the
infinite-scroll listeners assume) — so it was a no-op and the grid stopped
following the focus. Move back to scrollIntoView({block:'nearest'}), which
scrolls whatever element actually scrolls, and give the card
scroll-margin-top/-bottom so it clears the sticky header and the fixed
navbar instead of sliding under them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 20:19:08 +03:00
parent af9f4c77db
commit 48ea1fe720
2 changed files with 14 additions and 23 deletions
@@ -174,6 +174,10 @@
flex-shrink: 0;
user-select: none;
-webkit-user-select: none;
/* Keyboard scrollIntoView leaves room for the sticky header above and the
fixed bottom navbar below, so the focused card never hides under them. */
scroll-margin-top: 52px;
scroll-margin-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}
.thumb {