[whatwg] Control over selection direction

2011/1/13 Marijn Haverbeke <marijnh at gmail.com>

> My typical use case is that I mess with the content of the input, and
> then restore the selection. For example, after adding three characters
> to the front, I then restore selectionStart and selectionEnd by adding
> three to their original values. It seems that simply saving and
> restoring a selection does not address this case.
>

Isn't this use case addressed better by being able to clone a Selection and
set it later?  Such feature will also let you emulate selection's behavior
before you modify the actual selection, and seems to serve other use cases
as well.

- Ryosuke

Received on Thursday, 13 January 2011 11:02:47 UTC