W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2004

[whatwg] Standard method to get/set caret position

From: Greg Kilwein <gkilwein@fbsdata.com>
Date: Sun, 29 Aug 2004 16:52:18 -0500 (CDT)
Message-ID: <Pine.LNX.4.44.0408291634370.1153-100000@mail.fbsdata.com>
On Sun, 29 Aug 2004, Jim Ley wrote:
> 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.

How do existing UAs (or even native applications) handle this character in
text boxes?  If there is common precedent, then following it would be
advantageous.

Greg
Received on Sunday, 29 August 2004 14:52:18 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:36 UTC