MDL-57480 core_course: make drag and drop fire a dom updated event
When adding media via drag and drop, the notifyFilterContentUpdated event should be called after the item is added to the DOM. This allows things like videojs for example, to process the new content.
This commit is contained in:
@@ -774,6 +774,10 @@ M.course_dndupload = {
|
||||
resel.li.outerHTML = unescape(resel.li.outerHTML);
|
||||
}
|
||||
self.add_editing(result.elementid);
|
||||
// Fire the content updated event.
|
||||
require(['core/event', 'jquery'], function(event, $) {
|
||||
event.notifyFilterContentUpdated($(result.fullcontent));
|
||||
});
|
||||
} else {
|
||||
// Error - remove the dummy element
|
||||
resel.parent.removeChild(resel.li);
|
||||
|
||||
Reference in New Issue
Block a user