From 192417b7cd7384c2001b2be926246260bd728367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Tue, 9 Jun 2026 23:34:08 +0000 Subject: [PATCH] fix(core): guard element stamping to iframe-only (Studio preview) --- packages/core/src/runtime/init.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/src/runtime/init.ts b/packages/core/src/runtime/init.ts index 9486d5638..10c9bee9a 100644 --- a/packages/core/src/runtime/init.ts +++ b/packages/core/src/runtime/init.ts @@ -982,7 +982,9 @@ export function initSandboxRuntimeModular(): void { }); // Stamp data-start / data-duration on GSAP-targeted elements that lack // them so the Studio timeline can discover individual animated elements. - { + // Only when embedded in an iframe (Studio preview) — production renders + // run as the top-level page and must not mutate element timing. + if (window.parent !== window) { const rootComp = resolveRootCompositionElement(); const rootDuration = boundDuration > 0 ? boundDuration : 0; const dur = String(rootDuration > 0 ? rootDuration : 1);