fix(frontend): make the grid actually follow keyboard focus
deploy / deploy (push) Successful in 20s
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user