Finish search dialog