Skip to content

Commit

Permalink
Post title: fix focus when iframed (WordPress#51331)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix authored and sethrubenstein committed Jul 13, 2023
1 parent ec0d2af commit f362b30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/editor/src/components/post-title/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f362b30

Please sign in to comment.