optional method focus() restores focus to the input field