If the textarea was previously in focus anytime, invoking textarearef.focus() puts the cursor at the end of the text in it. Otherwise invoking textarearef.focus() puts the cursor at the begining of the text in it. How can i always have the cursor positioned at the begining of the text in the textarea? Thanks in advance