Fix autocomplete dismissal

Esc triggers the blur event before the sending the key code to the
input.