Skip to content

Media with a long filename breaks the UI when in a sidebar meta box #884

@goodguyry

Description

@goodguyry

Description of the bug

If the image selected via Fieldmanager_Media has a long enough filename, the preview container's width is extended. When the field is in the editor sidebar, it's extended width pushes the edit and remove buttons off the edge of the page.

Image

While the edit button's functionality is duplicated in the preview image's click handler, the remove button is unreachable.

Steps To Reproduce

  1. Add a Fieldmanager_Media field within an editor sidebar meta box
  2. Upload an image with a long name, such as 4d2ea1994d7ffa588d66a6c29a6a5fcew-c2623938235rd-w436_h236_r4_q80.jpg
  3. Use the Fieldmanager_Media field to select the newly-uploaded image
  4. Observe the edit and remove buttons are pushed out of reach

Additional Information

For now, I've fixed this by adding the following to my project

.fm-file-detail h4 {
    word-break: break-word;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions