Fix: focus input and set caret position.