-
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
Fix background height and padding in non-iframe editor canvas #63222
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
This issue first appeared in WP6.6 and I expect it will affect many sites, so hopefully it will be backported to WP6.6. |
Size Change: -2 B (0%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
I think the theme also has to be a non-block theme? |
Sorry, I missed it, but this problem may not be reproducible with block themes. Because if the Gutenberg plugin is enabled and it is a block theme, the
You should be able to reproduce the issue with Jetpack enabled in the following environments:
|
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 fixing this @t-hamano. In my testing it solves the issue and doesn't seem to regress any other behaviors.
Agree, this is an important fix for 6.6. 👍
Thank you everyone for your reviews! |
Co-authored-by: t-hamano <[email protected]> Co-authored-by: talldan <[email protected]> Co-authored-by: stokesman <[email protected]>
I just cherry-picked this PR to the wp/6.6 branch to get it included in the next release: 196c4db |
…ess#63222) Co-authored-by: t-hamano <[email protected]> Co-authored-by: talldan <[email protected]> Co-authored-by: stokesman <[email protected]>
Hey @t-hamano , it looks like this has introduced a problem with tablet/mobile mode when a metabox with a lot of content is present. |
@enricobattocchi Thanks for the report. Yes, I have confirmed that this PR does indeed cause issues in mobile/tablet views. I have summarized the cause in #63708. I would like to explore a more ideal solution. |
…ess#63222) Co-authored-by: t-hamano <[email protected]> Co-authored-by: talldan <[email protected]> Co-authored-by: stokesman <[email protected]>
Fixes #63110
Related to #62940
What?
This PR fixes two issues with the background when the post editor is not an iframe but does not have a meta box:
There is not enough space at the bottom of the content
The background color disappears halfway through
Why?
In #62940, the post editor was styled as follows to fix the triple scroll issue:
This style works in the non-iframe editor where meta boxes (custom fields) are enabled. However, the post editor will not become an iframe if there is a v2 or lower block present, even if it does not have a meta box. In this case, the
.has-metaboxes
class does not exist, so the editor defaults toheight:100%
, which seems to cause the issue mentioned above.How?
I used
.is-iframed
instead of.has-metaboxes
class to accurately determine if the editor is an iframe or not.Testing Instructions
Also, there have been some scrollbar fixes in this area in the past, so please make sure we have not run into regressions or unwanted scrollbars in the following cases:
wp.data.dispatch( 'core/notices' ).createInfoNotice( 'Notice' );
)Note: However, there is one issue that this PR doesn't solve: when you open the Pattern Editor in a non-iframe editor, the background gets cut off.
I believe the root cause of this issue is based on the fact that when the post editor is not an iframe, the pattern editor is not an iframe either. I believe the pattern editor should be an iframe regardless of whether the post editor is an iframe or not, just like the tablet and mobile views. However, since this change is impactful, I thought it should be addressed in a follow-up.
Screenshots or screencast
54b0e79636057729f77648cc991f7361.mp4