-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Simplify editor.canvas
by removing hasIframe
#46986
Conversation
Size Change: 0 B Total Size: 1.32 MB ℹ️ View Unchanged
|
Flaky tests detected in deb36c6. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3878478325
|
bc1fcc2
to
de99acd
Compare
de99acd
to
deb36c6
Compare
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.
Nice improvement 👍
What?
Inspired by #40815 (comment). Simplify
editor.canvas
by removing thehasIframe
option and checking the existence of the frame automatically.Why?
It's difficult to reason with when the developer has no experience with it before (#45070 (comment)).
How?
We can just return
this.page.frame( 'editor-canvas' ) || this.page
and expect the same result. As per the doc,editor-canvas
will only match thename
of the frame. So it won't match otherdiv
s with the same class.Testing Instructions
CI should pass.