From 1d152bdd45e1c28302e8f5e57dfe297f2266c4a9 Mon Sep 17 00:00:00 2001 From: Jacob Wright Date: Fri, 27 Aug 2021 13:01:16 -0600 Subject: [PATCH] [fix] attach transition/animation CSS to ownerDocument in iframes (#6680) --- src/runtime/internal/dom.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index 98adc99b59..2aef1c7f28 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -151,7 +151,7 @@ export function get_root_for_style(node: Node): ShadowRoot | Document { if ((root as ShadowRoot).host) { return root as ShadowRoot; } - return document; + return node.ownerDocument; } export function append_empty_stylesheet(node: Node) {