W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2011

[whatwg] DOM Range: redefining behavior under DOM mutation

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Thu, 7 Apr 2011 18:35:42 -0400
Message-ID: <BANLkTinBwdVG-mrzq4uBV3AkzYz1b7EBhw@mail.gmail.com>
On Thu, Apr 7, 2011 at 6:03 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
>> So browsers must be special-casing how execCommand() affects
>> selections somehow
>
> That's certainly what Gecko is doing, yes.

Thanks for the info.  In the end, I managed to define a reasonably
clean way of getting good enough results:

http://aryeh.name/gitweb.cgi?p=editcommands;a=blob_plain;f=editcommands.html;hb=d2481d02#preserving-ranges

There are some cases where its behavior is slightly unexpected, in
terms of putting the ends of the selection inside vs. outside
elements, but it's good enough for now.
Received on Thursday, 7 April 2011 15:35:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT