focus textfield on appear, handle Enter and Esc key