-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post title: fix autofocus when iframed #51331
Conversation
Size Change: +1 B (0%) Total Size: 1.39 MB
ℹ️ View Unchanged
|
Flaky tests detected in 0f70dc2. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5210858735
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick fix!
I can confirm that this solves the problem we were seeing when loading the Post Editor inside an iframe on wordpress.com. It auto-focuses the post title on a new post as it should and doesn't produce a CORS issue when trying to access the top-level window object.
Oh and congrats on shipping the Post Editor iframe canvas! 🎉 ✨
What?
In #48286, I adjusted post title autofocus to check for focus in the top document, but actually this should be the parent document because the editor itself might be iframed as well.
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast