1 parent df9f745 commit 72c2ce9Copy full SHA for 72c2ce9
1 file changed
src/components/panel/Filmstrip.tsx
@@ -313,6 +313,7 @@ const FilmstripList = ({
313
const isAnimatingScroll = useRef(false);
314
const scrollAnimationTimeout = useRef<any>(null);
315
const pendingScrollTarget = useRef<number | null>(null);
316
+ const hasCompletedInitialScroll = useRef(false);
317
const itemHeight = Math.max(20, height - VERTICAL_PADDING);
318
319
const getColumnWidth = useCallback(
@@ -472,6 +473,11 @@ const FilmstripList = ({
472
473
performSafeScroll(index);
474
}
475
prevSelectedPath.current = currentPath;
476
+ } else {
477
+ if (!hasCompletedInitialScroll.current && !isItemVisible(index)) {
478
+ performSafeScroll(index, true);
479
+ }
480
+ hasCompletedInitialScroll.current = true;
481
482
483
0 commit comments