-
Notifications
You must be signed in to change notification settings - Fork 4.6k
HTML Block: Fix scrolling within the modal #73506
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
Conversation
|
Size Change: -48 B (0%) Total Size: 2.54 MB
ℹ️ View Unchanged
|
|
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. |
|
Thanks Riad! 🙇 |
What?
Fix a couple of scrolling and modal issues with the new HTML block editing modal introduced in #73108 and after some modal component changes in #73150.
Namely, this PR ensures that when there's enough content in the HTML block modal to cause a scrollbar, it's the middle of the content that scrolls, and that content doesn't erroneously appear within the padding area. The issue is a bit clearer in the screenshots below.
Note: this PR doesn't address other existing issues with the modal, like the absence of responsive display in narrow viewports. A separate PR that swaps the side-by-side for a preview toggle could be a good follow-up.
Why?
It looks like the existing markup and styling didn't quite work for when the HTML block contains enough content to have a scrollbar.
How?
Gridinstead of aVStackas we don't want the header and footer areas to shrink, and this feels a bit more fit for purpose to meheight: 100%does so, and set the content area of the Tabs tooverflow-y: autoso that that's the area that scrollsTesting Instructions
Screenshots or screencast
This is the issue (note that the headers / footers weren't sticky, that the preview extends over the padding area)
Before video
Note that in the before video (what's on trunk), things look pretty okay until there's a bunch of content. Then, it falls apart:
2025-11-24.17.21.08.mp4
After video
With this PR, things should be looking pretty good irrespective of how much content there is. If there's too much, we scroll the middle area:
2025-11-24.17.19.48.mp4