Merge branch 'wip-MDL-68808-MOODLE_39_STABLE' of https://github.com/jason-platts/moodle into MOODLE_39_STABLE

This commit is contained in:
Eloy Lafuente (stronk7) 2020-10-06 23:12:19 +02:00
commit 57e0a20dec
3 changed files with 12 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -148,9 +148,16 @@ function($, log, str, templates, notification, LoadingIcon) {
M.core_formchangechecker.set_form_changed(); M.core_formchangechecker.set_form_changed();
} }
// Note, jQuery .change() was not working here. Better to // Note, jQuery .change() was not working here.
// use plain JavaScript anyway. var event;
originalSelect[0].dispatchEvent(new Event('change')); if (typeof Event === 'function') {
event = new Event('change');
} else {
// Support IE.
event = document.createEvent('Event');
event.initEvent('change', true, true);
}
originalSelect[0].dispatchEvent(event);
}; };
/** /**