From 5c5b267a7f228cb9f4f4ae0f5879926610da124b Mon Sep 17 00:00:00 2001 From: kgva CMS Date: Tue, 11 Aug 2026 19:03:17 +0000 Subject: [PATCH] feat: portfolio/about listings start locked on their first file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit same end state as clicking the first row by hand — hovering other rows no longer steals the preview until you actually click one. clicking a different row still jumps straight to it and relocks there; clicking the locked row again releases it back to hover-browsing. games are excluded (nothing to browse), matched via the game-embed class rather than page context so it stays correct no matter which page a game was launched from. --- assets/js/filebrowser.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/js/filebrowser.js b/assets/js/filebrowser.js index c18f980..1efcefa 100644 --- a/assets/js/filebrowser.js +++ b/assets/js/filebrowser.js @@ -85,6 +85,9 @@ var start = rows.findIndex(function (a) { return a.classList.contains("is-selected"); }); select(start < 0 ? 0 : start, true); // initial selection: don't echo into the shell yet + // portfolio/about listings start pre-locked on their first file, same as a + // manual click — games stay hover-driven, there's nothing else to browse there + if (container && !container.classList.contains("game-embed")) setFrozen(true); // warm the cache so switching between gallery images is instant var srcs = rows.map(function (a) { return a.getAttribute("data-img"); }).filter(Boolean);