Autocomplete: fix for resetting cursor position in an editable div on Esc