Merge branch 'MDL-75969-master' of https://github.com/andrewnicols/moodle

This commit is contained in:
Víctor Déniz 2022-10-27 15:29:40 +01:00
commit d76550da83

View File

@ -60,6 +60,23 @@ class behat_form_editor extends behat_form_textarea {
}
}
/**
* Returns the current value of the select element.
*
* @return string
*/
public function get_value(): string {
if ($this->running_javascript()) {
// Give any listening editors a chance to persist the value to the textarea.
// Some editors only do this on form submission or similar events.
behat_base::execute_in_matching_contexts('editor', 'store_current_value', [
$this->field->getAttribute('id'),
]);
}
return parent::get_value();
}
/**
* Select all the text in the form field.
*