-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: block/image
- image url cannot be modified after insertion if current url doesn't ends with .jpg
#48261
Comments
.jpg
block/image
- image url cannot be modified after insertion if current url is does't ends with .jpg
block/image
- image url cannot be modified after insertion if current url is does't ends with .jpg
block/image
- image url cannot be modified after insertion if current url doesn't ends with .jpg
Hello, I was checking this issue and found out that the mentioned url bug is appearing on all media related blocks (like image, video, audio, gallery) that uses the component marked below. This bug appears for all the extensions except few extensions like The temporary solutions suggested by @tresorama can work but I would like to have more opinions on this. |
@tresorama I believe this problem was fixed in #47949. However, this is a fix for the new LinkControl UI and this PR is part of Gutenberg 15.3. Thus, it would not apply to WordPress 6.2, which is bundled with up to Gutenberg 15.2. cc @brookewp |
Great, I will test it when 15.3 is available. |
@tresorama |
Description
If you use "Insert from Url", in
Image
block, and you insert a non.jpg
url and subimt, you can no longer replace the url because you are not able to click "edit" button.If instead you use a
.jpg
you are able to click the "edit" button.Other "url inserters", in other blocks of the editor, could be potential affected as well, but I didn't tested.
This is a visual bug.
The bug could be seen like this:
.jpg
extension, the editor<span>
element that contains the image filename shows a truncated and short text..jpg
extension (.webp
, or no extension), the image filename text is not treated the same, and this long text will then overflow the<span>
allowed size, pushing the edit button out of visible space.Step-by-step reproduction instructions
See below
Screenshots, screen recording, code snippet
Example of "working" url,
.jpg
Image Url (unknown copyright, be careful):
https://blog.hubspot.com/hs-fs/hubfs/bolden-typography-example.jpg?width=1460&height=746&name=bolden-typography-example.jpg
Example of "bugged" url ,
.webp
andno-extension
webp
scenarioImage Url (unknown copyright, be careful):
https://s1.wp.com/wp-content/themes/h4/landing/marketing/pages/hp-2022-oct/media/desktop/tablet-7-2x.webp
no-extension
scenarioImage url (unsplash image):
https://images.unsplash.com/photo-1676839560078-a6c6faa8637d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2064&q=80
Proposed Temporary solution
Ideally the url text should be truncated like in
.jpg
scenario.But, until that time, i suggest to include ASAP a temporary and CSS isolated fix, to have a good UX.
Here it is an example of that kind of fix (I don't know the css classes system so i presume this selector to be safe)
Environment info
tested also on (with same bug)
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
The text was updated successfully, but these errors were encountered: