fix #697 ESC in autocomplete resets the input to is previous value in FF

Close #809