From 10af9655f207b15028734c831290c4684571ac5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Mon, 18 May 2026 18:20:34 -0400 Subject: [PATCH] fix(studio): restore root-id resolution comment in __timelines path --- packages/studio/src/player/hooks/useTimelinePlayer.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/studio/src/player/hooks/useTimelinePlayer.ts b/packages/studio/src/player/hooks/useTimelinePlayer.ts index 5ab8b87e7..4614b3936 100644 --- a/packages/studio/src/player/hooks/useTimelinePlayer.ts +++ b/packages/studio/src/player/hooks/useTimelinePlayer.ts @@ -134,6 +134,10 @@ export function useTimelinePlayer() { if (win.__timelines) { const keys = Object.keys(win.__timelines); if (keys.length > 0) { + // Resolve the root composition id from the DOM — the outermost + // `[data-composition-id]` element is the master. Without this, + // Object.keys() order would let a sub-composition's timeline + // hijack play/pause/seek and the duration readout. const rootId = iframe?.contentDocument ?.querySelector("[data-composition-id]") ?.getAttribute("data-composition-id");