Working with text selection
Filed under: Development, Firefox, Internet Explorer, Opera, Safari, Technical
By Alex Back @ July 21, 2008 4:15 pm
Last week I started to implement a (still basic) low-level Text Selection API which especially the high-level form widgets like TextField and TextArea can make use of.
As some of you might already know working with the native Selection and Range / TextRange objects is not one of the things a developer dreams of
However, looking at the basic implementation one thing is quite amazing. Besides a little tweak for Opera three (Gecko, Safari and Opera) of the four major browsers share the same implementation.
Sure there will be some more differences to encounter when the development of this low-level layer moves on, but the start looks quite promising.

Comment by Chris Banford
Hi Alex,
Sounds like a very valuable thing to have!
From my experience with our Tools, it would be great if one could ‘easily’ move the Caret to the Start, End or any given position in a text block. Not sure if this is already part of your plan, but thought a little feedback might be nice
-Chris
July 25, 2008 7:08 pm