[whatwg] Normalization of user selections

Aryeh Gregor Simetrical+w3c at gmail.com
Thu Jun 16 12:00:25 PDT 2011


Another bounce, resending again.  Sorry for duplicate mail to the
non-list recipients.

On Wed, Jun 15, 2011 at 5:46 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
> 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.

Have any other similar bugs come up that make this seem like a
fundamental problem, instead of one we can solve by just adjusting
WebKit's behavior?  For instance, could we just say that empty inline
elements can have the cursor inside them, so foo{}<b></b>bar and
foo<b></b>{}bar both normalize to foo<b>{}</b>bar?  That would solve
the specific bug.

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?  E.g., if you have <b>foo</b>bar, and the user
places the cursor in between "foo" and "bar" by any means, it should
always be inside the <b>, not outside.  (Everyone but Gecko seems to
get this specific case right currently.)


More information about the whatwg mailing list