Remember the focused editor element when showing the autocomplete dropdown dialog, and switching the focus to the search field.
When we close the autocomplete dialog, switch the focus back to the editor.
Fixes issues with broken focus switching when pressing Esc while the dialog is opened.