WordPress.org

Make WordPress Core

Opened 11 days ago

Last modified 8 days ago

#48378 assigned defect (bug)

Firefox and Internet Explorer 11: Media modal controls section cut off at larger window sizes

Reported by: sabernhardt Owned by: afercia
Milestone: 5.4 Priority: normal
Severity: normal Version: trunk
Component: Media Keywords: needs-patch
Focuses: ui Cc:
PR Number:

Description

When using the "Insert from URL" feature for adding images in WordPress 5.3, the bottom "media-toolbar" container can cover the last settings controls in the scrolling container.

On that screen, the gray border line covers the "Link To" buttons group if:

  1. the window width is at least 783 pixels and
  2. either the "Image URL" or "None" button is selected.

At 782 and narrower, there is a bottom margin on those buttons that can provide just enough space. (Other browsers give plenty more space with a 32px bottom padding.)

Steps to reproduce (inserting image from URL):

  • Use the Classic Editor.
  • Edit a post.
  • Click the "Add Media" button.
  • Select "Insert from URL" from the side menu (the menu is found on the side if the window is at least 783 pixels wide).
  • Paste a URL into the field so the UI controls appear. https://via.placeholder.com/200
  • Scroll to the bottom of the settings container, and select each button.

This overlap may be found also on the Video Details screen, before a subtitle track is assigned. (Use the Video widget and click the "Edit Video" button to reach that screen.)

See additional comments on ticket #48087: https://core.trac.wordpress.org/ticket/48087#comment:15

Attachments (3)

ie11-media-from-url.png (5.5 KB) - added by sabernhardt 11 days ago.
"Link To" buttons hidden behind border line
ie11-media-from-url-custom-link.png (7.4 KB) - added by sabernhardt 11 days ago.
"Link To" buttons with Custom URL input below
48378.diff (389 bytes) - added by afercia 8 days ago.

Download all attachments as: .zip

Change History (8)

@sabernhardt
11 days ago

"Link To" buttons hidden behind border line

@sabernhardt
11 days ago

"Link To" buttons with Custom URL input below

#1 @SergeyBiryukov
10 days ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.4

#2 @afercia
8 days ago

After some research, this appears to be an area where browser implementations differ due to lack of clarity in the old CSS 2.1 spec.

As mentioned in ticket:48087#comment:15 the element with overflow: auto has a bottom padding of 32 pixels:

  • this padding is honored only by webkit browsers
  • not honored by IE 11
  • not honored by latest Firefox as well

Relevant discussion on the w3c/csswg-drafts GitHub:

[css-overflow-3] Clarify padding-bottom in overflow content
https://github.com/w3c/csswg-drafts/issues/129
Created on 21 May 2016: discussion is still ongoing and it's not clear to me what the consensus is.

There's a related (closed) Firefox ticket on the Mozilla tracker that was opened 8 years ago on April 2012:
https://bugzilla.mozilla.org/show_bug.cgi?id=748518

Thus, browser implementations still differ today.

Seems the best option is to change the WordPress implementation and not set the padding on the scrolling element. We could try to:

  • either set a bottom margin on the last child
  • or use an ::after pseudo element with the desired height to make room at the bottom of the scrolling element
  • either way, the 32 pixels value seems arbitrary to me: more a magic number rather than based on something meaningful and should probably be reduced

@afercia
8 days ago

#3 @afercia
8 days ago

48378.diff implements the first part mentioned on ticket:48087#comment:15 by making the URL field scroll into view when clicking on the "Custom URL" button.

#4 @afercia
8 days ago

  • Owner set to afercia
  • Status changed from new to assigned

#5 @afercia
8 days ago

  • Summary changed from Internet Explorer 11: Media modal controls section cut off at larger window sizes to Firefox and Internet Explorer 11: Media modal controls section cut off at larger window sizes
Note: See TracTickets for help on using tickets.