mirror of
https://github.com/moodle/moodle.git
synced 2025-07-24 15:51:56 +02:00
MDL-61135 javascript: fix modal body height resizing when loading
This commit is contained in:
2
lib/amd/build/modal.min.js
vendored
2
lib/amd/build/modal.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -272,7 +272,12 @@ define(['jquery', 'core/templates', 'core/notification', 'core/key_codes',
|
|||||||
if (value.state() == 'pending') {
|
if (value.state() == 'pending') {
|
||||||
// We're still waiting for the body promise to resolve so
|
// We're still waiting for the body promise to resolve so
|
||||||
// let's show a loading icon.
|
// 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('');
|
body.html('');
|
||||||
contentPromise = Templates.render(TEMPLATES.LOADING, {})
|
contentPromise = Templates.render(TEMPLATES.LOADING, {})
|
||||||
|
Reference in New Issue
Block a user