Skip to content

Media Replace: Long media url is overlapping edit icon and cause potential horizontal scrollbar #59807

@DamChtlv

Description

@DamChtlv

Description

Issue

It's difficult to edit media url that are too long (because the url overlap the edit icon)

Code

It seems to be caused by:

.block-editor-link-control__search-item-title,
.block-editor-link-control__search-item-info {
max-width: 200px;
white-space: nowrap;
}

Fix

I propose as a fix to use text overflow ellipsis:

image

Step-by-step reproduction instructions

  1. Go in the editor (in any context: page edition, template edition...)
  2. Add any media block (ex: image, video...)
  3. Click on the media block
  4. Click on "Insert a url" inside this block
  5. Add a long url and save
  6. Click on the video block and click on "Replace" in the toolbar
  7. Edit link icon is overlapped by the media url, and it can also cause really long horizontal scroll

Screenshots, screen recording, code snippet

Screenshots

image
image

Environment info

WordPress version 6.4.3

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

Labels

[Feature] MediaAnything that impacts the experience of managing media[Status] In ProgressTracking issues with work in progress[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