From 50047451d9706168cc9228d976fef45e3092b1d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Mon, 18 May 2026 18:53:25 +0200 Subject: [PATCH] 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 --- assets/js/app.js | 2 +- static/js/app.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 84c8f9a..7c2ca60 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -220,9 +220,9 @@ if (!lbBuilt) buildLbSlides(); lb.dataset.open = 'true'; document.body.style.overflow = 'hidden'; - goToSlide(lbIdx, false); lbBuildMeta(lbList[lbIdx]); lbBuildThumbs(); + goToSlide(lbIdx, false); } function lbClose() { diff --git a/static/js/app.js b/static/js/app.js index 84c8f9a..7c2ca60 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -220,9 +220,9 @@ if (!lbBuilt) buildLbSlides(); lb.dataset.open = 'true'; document.body.style.overflow = 'hidden'; - goToSlide(lbIdx, false); lbBuildMeta(lbList[lbIdx]); lbBuildThumbs(); + goToSlide(lbIdx, false); } function lbClose() {