[whatwg] Standard method to get/set caret position

Jim Ley jim.ley at gmail.com
Sun Aug 29 14:26:59 PDT 2004


On Sun, 29 Aug 2004 15:59:19 -0500 (CDT), Greg Kilwein
<gkilwein at fbsdata.com> wrote:
> Given a text box or textarea that I'll refer to as "tx":
> 
> tx.selectionStart: This is a read/write integer that would set or retrieve
>   the starting index of the selected text (one-based, so "1" would be
>   the first character in the string).  If nothing is selected, 0 would
>   be returned.

What do you do with characters such as a ZWJ, does it count in the
length, what happens if you set the caret to its position etc.

Jim.



More information about the whatwg mailing list