Skip to content

Commit

Permalink
Post title: fix focus when iframed (#51331)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix authored Jun 8, 2023
1 parent f6f0523 commit b52d61e
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

1 comment on commit b52d61e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in b52d61e.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5212843562
📝 Reported issues:

Please sign in to comment.