Skip to content

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

Closed

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

Activity

  1. added
    [Type] BugAn existing feature does not function as intended
    on Mar 13, 2024
  2. DamChtlv commented on Mar 13, 2024

    @DamChtlv
    Author

    Added fix in PR: #59808

  3. t-hamano commented on Mar 13, 2024

    @t-hamano
    Contributor

    Thanks for the report.

    What URL did you enter? Normally, the URL should be shortened as shown below.

    image

  4. ramonjd commented on Mar 14, 2024

    @ramonjd
    Member

    Maybe it's been fixed since #57775 ?

  5. DamChtlv commented on Mar 14, 2024

    @DamChtlv
    Author

    @t-hamano I have used url without file extension at the end (some CDN or other services have that kind of urls)

  6. torounit commented on Mar 22, 2024

    @torounit
    Member

    @DamChtlv

    I was able to reproduce this issue in WordPress 6.4.3, but it appears to have been fixed by #57775.

    Tested URL: https://picsum.photos/id/870/200/300?grayscale&blur=2

  7. github-actions commented on Apr 7, 2024

    @github-actions

    Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks.

  8. added
    [Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.
    on Apr 7, 2024
  9. DamChtlv commented on Apr 18, 2024

    @DamChtlv
    Author

    Can confirm it has been fixed as of WP 6.5

  10. t-hamano commented on Aug 5, 2025

    @t-hamano
    Contributor

    I noticed that the issue reported here has not been completely fixed yet. I'll submit a PR soon.

  11. removed
    [Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.
    on Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions