Problem/Motivation
Code that is calculating modal height in entity_browser.modal.js is
// If no maxHeight is defined, make it responsive.
dialog.option('height', vHeight - 100);
// Because there is no iframe height 100% in HTML 5, we have to set
// the height of the iframe as well.
var contentHeight = $this.find('.ui-dialog-content').height() - 20;
$this.find('iframe').css('height', contentHeight);
This works fine for bigger screens but will create more waste space on smaller screens like mobile:

Proposed resolution
We can try to improve this by removing fixed -100 value and using percentage there and also try to remove -20 value later.
Comments
Comment #2
pivica commentedHere is a first patch, and here is how it looks for small screens:
So we got a bit more height here for our mobile.
I needed to add a small amount of CSS because '-20' is removed, without it, that wrapper div is getting more height for some reason and triggering then vertical scrollbar on a parent.
Height is now 92% of screen height but IMHO i don't see why we would not go maybe even to 99% or 100%, on small screens at least but maybe even on bigger?
Comment #3
pivica commentedBtw, CSS change looks similar to https://www.drupal.org/project/entity_browser/issues/2692845#comment-109....
Comment #4
primsi commentedJust a question:
Isn't this very broad and could target other jQuery ui dialogs too?
Comment #5
pivica commented> Isn't this very broad and could target other jQuery ui dialogs too?
Hmm yes that is correct, did a long check on this but i cannot figure how to do it differently.
If we look at a HTML structure of jquery dialog we have
So there is really no good CSS class to apply that max-height: 100% rule.
We could maybe inject some CSS class in entity_browser.modal_selection.js selection, but that sounds like a maybe bad approach.
Is there some other smarter option to inject CSS in PHP?
Comment #6
primsi commentedSeems like we can add classes to specific Dialog components like this for example:
This is in \Drupal\entity_browser\Plugin\EntityBrowser\Display\Modal::openModal.
The options are defined here: http://api.jqueryui.com/dialog/#option-classes
Comment #7
primsi commentedIn patch form.
Comment #8
primsi commentedComment #9
oknateMarking RTBC. This looks like an improvement and low risk. I tested on chrome, emulating iphone 6/7/8 Plus.
Without change:

With change:

Comment #12
oknateCommitted. Thanks for your contribution.