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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
0221253cba
commit
0def91f8ab
+4
-1
@@ -254,7 +254,10 @@ class GestureWidget {
|
|||||||
const ctx = thumb.getContext('2d');
|
const ctx = thumb.getContext('2d');
|
||||||
ctx.scale(dpr, dpr);
|
ctx.scale(dpr, dpr);
|
||||||
this.drawPath(ctx, msg.path, rect.width, rect.height, this.theme().echo, 1.5, 0.15);
|
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 ──────────────────────────────────────────────────
|
// ── Rendering ──────────────────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user