[whatwg] Normalization of user selections

Ryosuke Niwa rniwa at webkit.org
Wed Jun 15 14:46:03 PDT 2011


On Wed, Jun 15, 2011 at 2:39 PM, Aryeh Gregor <AryehGregor at gmail.com> wrote:
>
> I originally thought the WebKit/Opera behavior was unreasonable, but
> I've come around to thinking it makes more sense than IE/Gecko.  It's
> simpler and more consistent.  If selections are always normalized, we
> can ignore all sorts of crazy situations like boundary points in
> comments, or between a character and a combining diacritic.  If we
> allowed such selections, we'd have to add extra spec text and code to
> handle them reasonably, despite the fact that they're corner cases
> that should only arise if the author manually sets the selection to
> something weird.
>

WebKit's current behavior makes impossible to set selection inside an empty
span (See http://webkit.org/b/15256) so we're planning to change WebKit's
behavior sometime in the future to align with IE/Gecko.

So I want to standardize some variant of the WebKit/Opera behavior,
> and guarantee that selection boundary points are always
> reasonable-looking (for some definition of reasonable TBD).  This
> would be a change to the existing spec text and the two biggest
> implementations, however, so I'd like to hear what everyone has to
> think before I start.
>

If we're taking this route, we must provide some way to work around issues
like the one I listed above.

- Ryosuke


More information about the whatwg mailing list