Scroll an input box to the cursor position in javascript
Posted
by sirlark
on Stack Overflow
See other posts from Stack Overflow
or by sirlark
Published on 2010-03-28T19:59:00Z
Indexed on
2010/03/28
20:03 UTC
Read the original article
Hit count: 360
JavaScript
|firefox
I've written a simple JS function that places the cursor at the end of the contents of an input box when it receives focus (the most common action in the box being to append). I haven't checked in IE, but when there is more text than is visible, even moving the cursor to the end of input doesn't scroll the view to the end of input in firefox 3.6.
Any idea how to do this?
P.S. And no I'm not using JQuery, nor is it an option ;)
© Stack Overflow or respective owner