clicking a tag adds its text to the search field