Skip to content

Embedded iFrame Youtube Video does not adhere to "max-width="100%" #5130

Closed
@JNR8

Description

@JNR8

Describe the Bug

When adding a YouTube video on a page, the video will break outside of the page boundaries if the video width is set to a dimension larger than the page width. Similarly when viewing on a mobile device the video does not adhere to max-width values regardless of the size of the videos iframe.

I have attempted to edit the iFrame using the WYSIWYG Gui and also directly using the source editor to include the max-width value within the iFrame, but these changes get removed when saving the page.

Steps to Reproduce

  1. Create a page
  2. add a video
  3. set video width to any value larger than the page width
  4. save page
  5. observer video breaking page width.

Expected Behaviour

Video should stay within page width boundaries. I believe that this should have been resolved in #4204. Forgive me if I missing something, but this should be applied by default, or should I be doing something different to what I have explained above?

Screenshots or Additional Context

No response

Browser Details

Any Browser, Any device

Exact BookStack Version

24.05.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions