-
Bug
-
Resolution: Fixed
-
Minor
-
3.0.4, 3.0.5, 3.0.6
-
MOODLE_30_STABLE
-
MOODLE_30_STABLE
-
Steps to reproduce (Moodle 3.0):
- Load a form with a tags or autocomplete field (e.g. the course edit form, when tags are enabled)
- Make no changes, and click a link to another page
- Expected: There are no unsaved changes, so the new page is loaded with no warning
- Actual: The browser displays a warning of unsaved changes.
MDL-52760 added a call to M.core_formchangechecker.set_form_changed() when an autocomplete filed is changed, so autocompletes would trigger the "unsaved data" warning like other fields. However, this is also called during the initialisation of the form, meaning the form is immediately marked dirty. set_form_changed() is also called with no arguments, meaning that it doesn't honour the "ignoredirty" class which would otherwise be a possible workaround.
The new autocomplete field in Moodle 3.1 doesn't exhibit this behaviour.