MDL-61135 javascript: fix modal body height resizing when loading

This commit is contained in:
Ryan Wyllie 2018-02-02 03:23:17 +00:00
parent a4f914b54d
commit 2328bcccde
2 changed files with 7 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -272,7 +272,12 @@ define(['jquery', 'core/templates', 'core/notification', 'core/key_codes',
if (value.state() == 'pending') {
// We're still waiting for the body promise to resolve so
// let's show a loading icon.
body.animate({height: '100px'}, 150);
var height = body.innerHeight();
if (height < 100) {
height = 100;
}
body.animate({height: height + 'px'}, 150);
body.html('');
contentPromise = Templates.render(TEMPLATES.LOADING, {})