diff --git a/packages/core/src/compiler/inlineSubCompositions.test.ts b/packages/core/src/compiler/inlineSubCompositions.test.ts index d3c939a657..a0a70c908c 100644 --- a/packages/core/src/compiler/inlineSubCompositions.test.ts +++ b/packages/core/src/compiler/inlineSubCompositions.test.ts @@ -411,6 +411,25 @@ describe("inlineSubCompositions – #ID selector scoping divergence", () => { expect(host.hasAttribute("data-timeline-locked")).toBe(true); }); + it("propagates data-no-timeline from inner root to host element", () => { + const stillSubComp = ` + +
+ Hello +
+`; + + const document = makeHostDocument("captions"); + const host = document.querySelector('[data-composition-src="intro.html"]')!; + + inlineSubCompositions(document, [host], { + resolveHtml: () => stillSubComp, + parseHtml: (html) => parseHTML(html).document, + }); + + expect(host.hasAttribute("data-no-timeline")).toBe(true); + }); + it("producer path propagates data-hf-authored-id to host when inner root has id", () => { const document = makeHostDocument("intro"); const host = document.querySelector('[data-composition-src="intro.html"]')!; diff --git a/packages/core/src/compiler/inlineSubCompositions.ts b/packages/core/src/compiler/inlineSubCompositions.ts index 4951f666c9..c831f3adf0 100644 --- a/packages/core/src/compiler/inlineSubCompositions.ts +++ b/packages/core/src/compiler/inlineSubCompositions.ts @@ -693,6 +693,9 @@ export function inlineSubCompositions( if (innerRoot?.hasAttribute("data-timeline-locked")) { hostEl.setAttribute("data-timeline-locked", ""); } + if (innerRoot?.hasAttribute("data-no-timeline")) { + hostEl.setAttribute("data-no-timeline", ""); + } // Copy dimension attributes from inner root to host if missing if (innerRoot) {