From b52d61ed6c1307e9ccf0eedaddafe52c06033dbd Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Thu, 8 Jun 2023 18:12:49 +0300 Subject: [PATCH] Post title: fix focus when iframed (#51331) --- 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