Fix search blur event

I noticed that the autocomplete on the API search wasn’t being
dismissed when the input lost focus. Turns out the escape key blurs the
input before it sends the key to the input.