w3c / selection-api

Selection API
http://w3c.github.io/selection-api/
Other
47 stars 30 forks source link

Add APIs to save/restore selection #43

Closed BenjamP closed 9 years ago

BenjamP commented 9 years ago

Forked from w3c/editing-explainer#39.

To summarize:

In order for editors to move the selections temporary, do some work in other regions, then restore the selections back, we need a new APIs. This APIs not only save all public properties of selections but also internal states as well, so that the selections can really be restored. There are some details we need to take care of, such as IME uncommitted strings. Usually IME uncommitted strings are committed when the selections are changed. But since IME uncommitted strings are part of the internal selection states, and since we want to restore it later, UA should cancel them on save (or save then move the selection.) Not sure whether this should be spec'ed, just an informative note, or not needed in the spec though.

BenjamP commented 9 years ago

Oops didn't notice this was already correct