W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2008

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

From: Olli Pettay <Olli.Pettay@helsinki.fi>
Date: Sat, 27 Dec 2008 15:56:51 +0200
Message-ID: <49563423.8080408@helsinki.fi>
To: Kartikaya Gupta <lists.webapps@stakface.com>
CC: public-webapps@w3.org
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.


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

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:13 UTC