Fix lightbox thumb strip not scrolling to current plate on direct load

lbBuildThumbs() was called after goToSlide(), so the scroll in
syncThumbs() ran against an empty container. Reorder so thumbs are
built before goToSlide() positions them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-18 18:53:25 +02:00
parent ea54fe949d
commit 50047451d9
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -220,9 +220,9 @@
if (!lbBuilt) buildLbSlides(); if (!lbBuilt) buildLbSlides();
lb.dataset.open = 'true'; lb.dataset.open = 'true';
document.body.style.overflow = 'hidden'; document.body.style.overflow = 'hidden';
goToSlide(lbIdx, false);
lbBuildMeta(lbList[lbIdx]); lbBuildMeta(lbList[lbIdx]);
lbBuildThumbs(); lbBuildThumbs();
goToSlide(lbIdx, false);
} }
function lbClose() { function lbClose() {
+1 -1
View File
@@ -220,9 +220,9 @@
if (!lbBuilt) buildLbSlides(); if (!lbBuilt) buildLbSlides();
lb.dataset.open = 'true'; lb.dataset.open = 'true';
document.body.style.overflow = 'hidden'; document.body.style.overflow = 'hidden';
goToSlide(lbIdx, false);
lbBuildMeta(lbList[lbIdx]); lbBuildMeta(lbList[lbIdx]);
lbBuildThumbs(); lbBuildThumbs();
goToSlide(lbIdx, false);
} }
function lbClose() { function lbClose() {