#53636 closed defect (bug) (fixed)
"Insert from URL": top of preview is cut off
Reported by: | siliconforks | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | has-patch has-screenshots commit |
Focuses: | ui, css, administration | Cc: |
Description
In the "Add Media" dialog box, when using the "Insert from URL" function, the top of the preview is cut off.
Steps to reproduce:
- Install the "Classic Editor" plugin.
- Go to "Pages", then "Add New".
- Click the "Add Media" button.
- Click "Insert from URL".
- Enter the URL of an image. A preview of the image will be displayed below the URL field. Note that the top of the image is cut off.
This is especially noticeable for small images. For example, consider the following image:
https://s.w.org/style/trac/common/feed.png
Almost the entire image will be cut off.
Attachments (8)
Change History (24)
#1
@
3 years ago
- Component changed from General to Media
- Focuses ui css administration added
- Keywords has-patch added
- Milestone changed from Awaiting Review to 5.9
- Owner set to sabernhardt
- Status changed from new to accepted
I have seen this before (ticket:48378#comment:6), but it was not fixed on that ticket.
It also happens when embedding videos with Insert from URL.
The patch increases the top spacing to 82 pixels to match the specified height of the input plus padding on the span.
To accommodate the possibility of users adjusting text size slightly larger than 18px, we could also reduce the bottom padding on the span (as low as 2px to leave room for the focus outline). The 82px top spacing would still give 16 pixels between the input border and the media details container at the expected font size.
#2
@
3 years ago
The patch 53636.diff working fine once the image loaded from URL but it adds more space. Please check above attached screenshots.
#3
@
3 years ago
- Keywords needs-testing added
53636.1.diff: With a top margin of zero on the Link text setting's container, its label and field are 2 pixels lower than they have been. However, that is much closer than 12 (in the previous patch).
#4
@
3 years ago
The preview was also partially hidden when using the image widget, and the patch's top
value adjustment pushes the preview container down (as when inserting into the classic post editor).
In the widget dialog, I think the 10-pixel margin above the Alternative Text label and input should stay. It's necessary when the preview shows.
#5
@
3 years ago
- Milestone changed from 5.9 to 6.0
With only a few hours before Beta, let's revisit this later, for next release.
This ticket was mentioned in Slack in #core-media by joedolson. View the logs.
3 years ago
This ticket was mentioned in Slack in #core-test by boniu91. View the logs.
3 years ago
This ticket was mentioned in Slack in #core-test by boniu91. View the logs.
3 years ago
This ticket was mentioned in Slack in #core-test by monikarao. View the logs.
3 years ago
This ticket was mentioned in Slack in #core-test by ankit-k-gupta. View the logs.
3 years ago
#12
@
3 years ago
Test Report
Env
- WordPress 5.9-alpha-51272-src
- Chrome Version - 96.0.4664.55 (Official Build) (x86_64)
- OS - macOS Monterey
- Theme: Twenty Twenty One
- Editor - Classic Editor
- PHP - 8.0.0
- Web Server - nginx
- Database - MySQL 8.0.16
- Used patch file - 53636.1.diff
Steps to test
- Install the "Classic Editor" plugin.
- Go to "Pages", then "Add New".
- Click the "Add Media" button.
- Click "Insert from URL".
- Enter the URL of an image. A preview of the image will be displayed below the URL field.
Test result
Working expected now. Image preview has proper margin from top and bottom. Tested with small as well as large size images.
Screencast example:
Before Fix (Large Image) -
After Fix -
Before Fix (Small Image) -
After Fix -
This screenshot was taken with WordPress 5.8-RC2 (but the issue seems to be present in 5.7 too).