history function activates history tab and focuses search