MDL-82373 core: Make CollapsibleRegion more tolerant to behat

This commit is contained in:
Andrew Nicols 2024-07-05 23:36:25 +08:00
parent 7e17945088
commit 5e4ba1f036
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14

View File

@ -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.