Fix bugs related to arrow keys in search result box