Fix autofocus and autocomplete issue