Refactor `click_to_focus`