Improve search dialog focus handling.