[whatwg] Normalization of user selections

Ojan Vafai ojan at chromium.org
Thu Jun 16 12:33:58 PDT 2011


On Thu, Jun 16, 2011 at 12:09 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:

> On Thu, Jun 16, 2011 at 11:50 AM, Aryeh Gregor <AryehGregor at gmail.com
> >wrote:
> Assuming we don't match WebKit/Opera here, though, does everyone agree
> > we should still place constraints on what selections can be generated
> > by *user* actions?
>
> Yes, I think all selection modified by user should be normalized by
> default.
>  I'm talking more about programmatically set selection.  I think we'll need
> to preserve programmatically set selection ranges instead of always storing
> normalized ranges.
>

I disagree. That defeats all the benefits of normalizing. Now all the code
that handles editing can't assume normalization.

On Thu, Jun 16, 2011 at 12:22 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:

> It's inevitable in some sense because we can't guess the user intent
> although Firefox and Microsoft Word seem to use the direction to which user
> moved caret as a hint.


I know Firefox does this, but which version/OS does Word do this on? We
still need to define the normalization behavior for when the user sets the
selection via the mouse. In my anecdotal experience, people get very
confused by the Firefox behavior. Once it's been described to them, they get
it, but they are unable to figure it out on their own.

Ojan



More information about the whatwg mailing list