e32b77b7a3
In Moodle 3.5 dialogues are focused too frequently and active focus is often wrong. This means that the dialogue has focus after selecting an element in a form autocomplete element. As a result, pressing the escape key causes the dialogue to be closed. The older `key_press` call is sufficient to close the autocomplete in the cases where this is needed, but will not cuase the dialogue to be closed.