mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
34321d491b
Probably as a result of recent changes in the way how forms client side validators are trigerred (MDL-52826), the field validator has been triggered before the underlying textarea's values property is updated by TinyMCE. This led to marking such a field as "required" even if the value is provided. Inspired by http://stackoverflow.com/questions/2122085/ this patch adds a new onchange callback that automatically keeps the underlying textarea synced with the editor iframe. Relevant API docs: http://archive.tinymce.com/wiki.php/Configuration3x:onchange_callback I was also trying to call the save() method via the editor's onSubmit method but that one seems to be also triggered only after the validator.