Problem/Motivation

Media Library's embed modal is almost unusable with less than 600px browser viewport width (every core theme is affected).

Media Library's embed modal on Bartik theme

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

huzooka created an issue. See original summary.

martijn de wit’s picture

I can confirm the same issue, using media library in the CK-editor.
However I've got a tool in the right corner of the footer to drag the window bigger.

Using Chrome 79.0.3945.79 on OSX 10.14.6. Drupal 8.8.0 and Seven as admin heme.

Media library in CK-editor
Media library in CK-editor - dragged bigger

wim leers’s picture

Issue tags: +Usability

Thanks for reporting, @huzooka, and thanks for confirming, @Martijn de Wit!

Does this also apply to other modal dialogs? The link editing one in CKEditor for example?

huzooka’s picture

Re #3:

This seems to be a media library specific issue.

(Seven:)

martijn de wit’s picture

StatusFileSize
new33.07 KB
new25.3 KB

Good question.

Tested 2 other widgets; table and link (with some extra modules like linkit, etc into it). They seems to have no problem to set e proper height when the screen is smaller than 600px.

CK-editor link widget

ck-editor tabel widget

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

volkswagenchick’s picture

Adding NorthAmerica2021 and Easy Out of the Box tags for visbility.

DrupalCon NA is April 12-16 with a focus on EOOTB on Wednesday, April 14.
Thanks

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

phenaproxima’s picture

Referencing an issue that I closed as a duplicate because it overlaps with this one.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

davidhk’s picture

A user has reported this problem after we recently launched the upgraded D9.4 version of our site (we previously used D7 + Scald).

I can reproduce the same behaviour: if I open the embed modal when the browser is less than 600px wide I get the unusably short modal shown above.

I thought it might be something to do with CSS media queries changing the height of the modal. But if I start with the browser at over 600px wide, open the modal so it looks fine, then drag the edge of the browser across so it shrinks to under 600px wide, the modal's height isn't affected. It remains usable, filling most of the screen.

Or if I start with the browser at under 600px wide, click the "Insert from Media Library" button so I get the modal that is unusably short, then drag the edge of the browser across so it expands to over 600px wide, then again the modal's height isn't affected - but this time it stays short and unusable.

I'm a bit out of my depth here but does that mean the issue isn't caused by CSS media queries?

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

paintingguy’s picture

Its brutal trying to insert media in drupal 9 using ckeditor 4. Hope this gets resolved!

Edited
I switched admin theme from claro to seven and it works much better. but still impossible on a mobile phone or small screen.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

chike’s picture

This made it usable for me,

@media (max-width: 767px) {
  .ui-dialog #drupal-modal.ui-dialog-content.ui-widget-content {
    min-height: 500px !important;
  }
}
bspeare’s picture

I've also encountered this issue only on Windows Edge and Chrome browsers.

paintingguy’s picture

#17 works for me as well. Thank you!

paintingguy’s picture

oops, #17 did not work after all. I tried adding this into CSS Injector but no change. Any other suggestion?

paintingguy’s picture

Ha! I realized I was adding #17 to the wrong theme. When I selected Claro and the theme in CSS Injector, It works much better. Thank you!

bspeare’s picture

Using viewport height makes the size closer to what the JavaScript is calculating.
min-height: 70vh!important;

davidhk’s picture

The combination of #17 and #22 fixes the problem, thank you.

graber’s picture

StatusFileSize
new473.87 KB

I see this on the other hand. Claro.

not wide enough

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.