From 7f706f12cd2f7890032258c9fd073760942b8caa Mon Sep 17 00:00:00 2001 From: Kiyomichi Kosaka Date: Fri, 20 Jun 2025 08:00:10 +0200 Subject: [PATCH] fix grid animation when navigating from detail --- script.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/script.js b/script.js index 36bffcc..45b8420 100644 --- a/script.js +++ b/script.js @@ -840,6 +840,11 @@ function animateSwipe(direction, onDone) { const grid = document.getElementById('eonstripGrid'); if (!grid) { onDone(); return; } + // Ensure a clean starting state when the grid was previously hidden + grid.style.transition = 'none'; + grid.style.transform = 'translateX(0)'; + void grid.offsetWidth; // force reflow + // slide out grid.style.transition = 'transform 0.3s ease'; grid.style.transform = `translateX(${direction > 0 ? '-100%' : '100%'})`;