-
Notifications
You must be signed in to change notification settings - Fork 356
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
[Bug]: Content overflows outside content area on mobile devices for theme Feelin' Good #7682
Comments
Support References This comment is automatically generated. Please do not edit it.
|
I have reproduced this and will look at a fix now. |
This is turning out to be a tricky issue. The fix is simple in theory but can be made in different places: core, Jetpack, and individual theme files. I've found that most themes don't have this issue, but comparing those with Feelin' Good, I can't see what's different. Ideally, I would make Feelin' Good consistent with them rather than add some special CSS to its theme. Another option is to update Jetpack in a way that iframe use I also found that the Freddie theme has a similar issue to the one reported here. There are probably others, too, which makes me think that we should fix it in the block. I will try and deploy something tomorrow. |
This looks workable to me with the aspect-ratio change. Let's just make sure we're not breaking other themes in the process: Other themes like twentytwentythree / four are doing dynamic resizing of the iframe to avoid this overflow. Is that part of videopress or the theme itself? |
This is the resize function that sets the iframe's This code is in the script https://v0.wordpress.com/js/next/videopress-iframe.js?m=1674852142 and runs on load. It executes for all themes I checked. The value it uses for the
This is always the tricky part with so many themes out there. But based on how T23 and T24 work today, setting I'll also update the |
@mpkelly You think this should be flagged as project or apply simple fix and provide more elegant solution later on? |
I'm taking this over. I have found a solution.
The issue is because the script gets the iframe parent to get the width without removing the iframe from the DOM tree so it cannot return the correct value. The fix would be something like this: + // Hide the iframe to calculate the real parent width
+ t.firstElementChild.style.display = 'none';
var r = getComputedStyle(t), n = parseFloat(r.width);
+ // Show the iframe after reading the parent's width
+ t.firstElementChild.style.display = null; Where can I find the source file for |
Quick summary
Feelin' Good theme is not mobile responsive. The content added overflows outside content area for mobile devices. Some of the content can't be seen. User reported issue with videos on their site in -zen. I could replicate this on my site - https://testbizplanplayground.wpcomstaging.com/home-2/
Steps to reproduce
What you expected to happen
The content should appear within the content area
What actually happened
The content (text, image, video) stretches outside the content area making a portion of it not visible to viewers
Browser
Google Chrome/Chromium
Context
Customer report in 7894295-zen regarding video not fitting in the frame.
Platform (Simple, Atomic, or both?)
Simple, Atomic
Other notes
No response
Reproducibility
Consistent
Severity
None
Available workarounds?
None
Workaround details
On inspecting I noticed, this is caused because of following CSS
body .is-layout-flex {
display: flex;
}
Changing to display:block fixes the issue but I feel this workaround is incorrect. Let me know if this would work as temporary fix:
@media only screen and (max-width: 600px) {
body .is-layout-flex {
display: block;
}
}
The text was updated successfully, but these errors were encountered: