From 0f70dc2a1b7b07cf4c6a8e09d89b507425354e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ella=20van=C2=A0Durpe?= Date: Thu, 8 Jun 2023 14:49:27 +0300 Subject: [PATCH] Post title: fix focus when iframed --- packages/editor/src/components/post-title/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/src/components/post-title/index.js b/packages/editor/src/components/post-title/index.js index b9cc0adaa275ca..4803d89942b481 100644 --- a/packages/editor/src/components/post-title/index.js +++ b/packages/editor/src/components/post-title/index.js @@ -75,7 +75,7 @@ function PostTitle( _, forwardedRef ) { } const ownerDocument = - ref.current.ownerDocument.defaultView.top.document; + ref.current.ownerDocument.defaultView.parent.document; const { activeElement, body } = ownerDocument; // Only autofocus the title when the post is entirely empty. This should