Skip to content

Commit 020c898

Browse files
committed
fix(registry): force GSAP render at attach — seek(0) is a no-op on a fresh timeline
1 parent 08620b7 commit 020c898

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎registry/components/caption-pill-karaoke/caption-pill-karaoke.html‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,11 @@
565565
var layout = hfApplyStageConfig(data, v.durationS);
566566
var tl = hfBuild(v.words, layout, v.durationS);
567567
tl.set({}, {}, v.durationS); // pin timeline length to the data-derived duration
568-
tl.seek(0);
568+
// GSAP quirk (confirmed 3.14.2): a fresh timeline already reports position 0,
569+
// so seek(0) is treated as a no-op and skips rendering .set() calls scheduled
570+
// at t=0 — the first frame would show pre-timeline CSS defaults (usually
571+
// hidden). render(time, suppressEvents, force) with force=true bypasses that.
572+
tl.render(0, true, true);
569573
hfCurrentTimeline = tl;
570574
window.__timelines = window.__timelines || {};
571575
window.__timelines[HF_COMPOSITION_ID] = tl;

‎registry/components/caption-weight-shift/caption-weight-shift.html‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,11 @@
580580
var layout = hfApplyStageConfig(data, v.durationS);
581581
var tl = hfBuild(v.words, layout, v.durationS);
582582
tl.set({}, {}, v.durationS); // pin timeline length to the data-derived duration
583-
tl.seek(0);
583+
// GSAP quirk (confirmed 3.14.2): a fresh timeline already reports position 0,
584+
// so seek(0) is treated as a no-op and skips rendering .set() calls scheduled
585+
// at t=0 — the first frame would show pre-timeline CSS defaults (usually
586+
// hidden). render(time, suppressEvents, force) with force=true bypasses that.
587+
tl.render(0, true, true);
584588
hfCurrentTimeline = tl;
585589
window.__timelines = window.__timelines || {};
586590
window.__timelines[HF_COMPOSITION_ID] = tl;

0 commit comments

Comments
 (0)