I posted this question, [URL=”http://www.webdeveloper.com/forum/showthread.php?t=156927″]http://www.webdeveloper.com/forum/showthread.php?t=156927
a while ago. While I didn’t receive any replies on this forum, I also posted on Google Groups and received the following useful reply from Randy Webb,
It would make more sense to do self.bc_msg.scrollTop = cursorPosition;
Search the archives for the methods of determining cursorPosition in a
textarea. Then, you don’t have any of the other problems you are
encountering by trying to muck with the cursor/scroll.
I followed this idea and you can see the results here [URL=”http://www.acollectionofwork.com/textarea/”]http://www.acollectionofwork.com/textarea/
However if one enters 4 or 5 lines of text, then places the cursor at the beginning of the textarea, and taps the right arrow key to navigate through the text in the texstarea, then the textarea slowly scrolls down until the line the cursor is on disappears from from view.
The following is a link to the Google Group post which reiterates the problem, although perhaps in a little more detail.
[URL=”http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/f070cbc092d21045/a78133621b7f7376?lnk=gst&q=YATQ&rnum=1#a78133621b7f7376″]http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/f070cbc092d21045/a78133621b7f7376?lnk=gst&q=YATQ&rnum=1#a78133621b7f7376
Hope someone can help.
Many thanks,
Jack