[whatwg] DOM Range: redefining behavior under DOM mutation

Aryeh Gregor Simetrical+w3c at gmail.com
Thu Apr 7 15:35:42 PDT 2011


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.



More information about the whatwg mailing list