change cursor position to 0 if no text input