mirror of
https://github.com/moodle/moodle.git
synced 2025-07-23 15:22:05 +02:00
MDL-61135 javascript: fix modal body height resizing when loading
This commit is contained in:
@@ -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, {})
|
||||
|
Reference in New Issue
Block a user