Skip to content

Latest Posts: When the full content option is used, videos are not contained and shows with the original width and height #61477

@carolinan

Description

@carolinan

Description

In the latest posts block, when the option "Post content > Show full post" is used, videos have no width set on the front of the site. So they are not contained to the space that is allocated for the post. It expands outside the list item and covers / overlaps other content and can create a horizontal scroll bar.

For example in my test, I set the block to use a five column grid.
In the editor, the video was 107px wide and was contained to its column.
On the front, the video was 3016px wide, the media file's original width.

Step-by-step reproduction instructions

Create a new post and add a video block, or: a cover block or media & text block with a video.

Add a latests posts block (In the same post, a new post or page, or in a template, it does not matter).
Enable "Post content > Show full post" in the block settings panel of the latests post block.
Confirm that the video(s) are reasonably sized and does not overlap any other content in the editor.
Save and view the front of the site.
Note the size of the video.

Test both the grid layout with different columns and the default list view layout.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DevReady for, and needs developer efforts[Block] Latest PostsAffects the Latest Posts Block[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions