diff --git a/lib/javascript-static.js b/lib/javascript-static.js index 94216ace27f..950768eecf0 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -138,6 +138,10 @@ M.util.CollapsibleRegion = function(Y, id, userpref, strtooltip) { from: {height:height} }); + animation.on('start', () => M.util.js_pending('CollapsibleRegion')); + animation.on('resume', () => M.util.js_pending('CollapsibleRegion')); + animation.on('pause', () => M.util.js_complete('CollapsibleRegion')); + // Handler for the animation finishing. animation.on('end', function() { this.div.toggleClass('collapsed'); @@ -152,6 +156,8 @@ M.util.CollapsibleRegion = function(Y, id, userpref, strtooltip) { } else { this.icon.set('src', M.util.image_url('t/expanded', 'moodle')); } + + M.util.js_complete('CollapsibleRegion'); }, this); // Hook up the event handler.