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 ──────────────────────────────────────────────────