Detach autocomplete when it is not used.