mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 09:16:55 +00:00
fix(core): a still sub-composition's data-no-timeline on its template root skips the timeline wait (#6762)
* fix(core): a still sub-composition's data-no-timeline on its template root skips the timeline wait * chore(core): drop a comment the copy already says
This commit is contained in:
@@ -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 = `<!doctype html>
|
||||
<html><head></head><body>
|
||||
<div id="captions" data-composition-id="captions" data-no-timeline data-width="1920" data-height="1080">
|
||||
<span>Hello</span>
|
||||
</div>
|
||||
</body></html>`;
|
||||
|
||||
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"]')!;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user