Skip to content

Image: Long captions break lightbox #51170

@artemiomorales

Description

@artemiomorales

Description

In the image lightbox, large captions will get cut off on desktop and will cause the lightbox to rendered incorrectly on mobile.

Step-by-step reproduction instructions

  1. Ensure the Interactivity API and Behaviors UI setting is enabled in Gutenberg > Experiments in the admin.
  2. Create a new post and add an image with a long caption of a few paragraphs.
  3. Activate the image's lightbox via Advanced > Behaviors > Lightbox.
  4. Publish and view the post.
  5. Click on the image; see that the caption is cut off on desktop and that the image and/or caption are cut off on mobile.

Screenshots, screen recording, code snippet

Desktop View

Screen Shot 2023-06-01 at 3 34 35 PM

Mobile View

Screen Shot 2023-06-01 at 3 35 02 PM

Environment info

WP 6.2, Gutenberg 15.9
Chrome
Mac OSX

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

    [Block] ImageAffects the Image Block[Feature] Interactivity APIAPI to add frontend interactivity to blocks.[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions