MDL-82373 core: Make CollapsibleRegion more tolerant to behat

This commit is contained in:
Andrew Nicols
2024-07-17 13:28:55 +08:00
parent 0f0710a249
commit ed4a47302e
+6
View File
@@ -134,6 +134,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');
@@ -148,6 +152,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.