MDL-57680 form autocomplete: fix triggering change event

This commit is contained in:
Tim Hunt
2020-04-26 13:23:42 +01:00
parent 588b86fd49
commit be612e5f68
3 changed files with 6 additions and 3 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -1
View File
@@ -145,7 +145,10 @@ function($, log, str, templates, notification, LoadingIcon) {
if (typeof M.core_formchangechecker !== 'undefined') {
M.core_formchangechecker.set_form_changed();
}
originalSelect.change();
// Note, jQuery .change() was not working here. Better to
// use plain JavaScript anyway.
originalSelect[0].dispatchEvent(new Event('change'));
};
/**