Re: [DOM2 Range] bug in example to handle insertions

On 12/27/08 2:17 AM, Kartikaya Gupta wrote:
> Found an issue in DOM2 Range that doesn't seem to be addressed anywhere that I could find:
>
> Section 2.12.1 (handling insertions) says that the boundary point offset should only be adjusted if the insertion point's offset is strictly less than it. However, the first example they give doesn't do this. In the example the start boundary point and insertion point both have an offset of 10 and they adjust the offset anyway, so that "inserted text" stays out of the range. Opera and Firefox both do what the text says and so "inserted text" ends up in the range (Webkit doesn't seem to handle this very well, it doesn't update anything so the range ends up selecting "inserted "). I agree with Opera/FF's behavior, so I think the example should be corrected to include the inserted text.
>
> Cheers,
> kats
>
>
What is the example that you think should be changed?
Note, the range in the examples has never startOffset 10, but 11.

The attachment shows the same behavior on Gecko trunk and FF3.1, Opera 
9.6 and WebKit trunk.


-Olli

Received on Saturday, 27 December 2008 13:57:31 UTC