-
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
Fix tiny editor preview when using Mobile or Tablet options with metaboxes enabled #24478
Conversation
height, | ||
minHeight: height, | ||
maxHeight: height, |
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.
Seems unusual that three height properties are needed, but I couldn't see another way.
Size Change: +7 B (0%) Total Size: 1.16 MB
ℹ️ View Unchanged
|
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.
Tested across browsers, with and without metaboxes, and LGTM.
Description
Fixes #23404.
The issue was caused by
overflow-y: auto
being applied to the editor area, but nomin-height
being set which caused the area to collapse.I've fixed this by making the preview area generally try to have the right dimensions for the desired devices (min-height of 768px for the mobile option, and 1024px for the Tablet option).
This does result in the metabox options being pushed down the page a bit, but I think this is ok, the user can still scroll down, and generally has to do that anyway outside of preview. When a user selects one of those preview options, they generally want to be able to see the content at the right size first and foremost.
How has this been tested?
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: