From 0def91f8abfb4028f6e7d58f695ffa1d0c7bc121 Mon Sep 17 00:00:00 2001 From: Bendik Aagaard Lynghaug Date: Sun, 23 Aug 2026 13:16:53 +0200 Subject: [PATCH] Echo thumbnails fade in via timeout, not rAF The 'shown' class only needs a later tick for the opacity transition to run - requestAnimationFrame never fires in headless engines (caught in hwatu verification), and a timeout is equivalent in real browsers. Co-Authored-By: Claude Fable 5 --- gesture.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gesture.js b/gesture.js index e4121ef..51d40e2 100644 --- a/gesture.js +++ b/gesture.js @@ -254,7 +254,10 @@ class GestureWidget { const ctx = thumb.getContext('2d'); ctx.scale(dpr, dpr); this.drawPath(ctx, msg.path, rect.width, rect.height, this.theme().echo, 1.5, 0.15); - requestAnimationFrame(() => thumb.classList.add('shown')); + // A timeout, not requestAnimationFrame: the class must land on + // a later tick for the opacity transition to run, and rAF + // doesn't tick at all in headless engines. + setTimeout(() => thumb.classList.add('shown'), 30); } // ── Rendering ──────────────────────────────────────────────────