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

[DOM2 Range] bug in example to handle insertions

From: Kartikaya Gupta <lists.webapps@stakface.com>
Date: Sat, 27 Dec 2008 00:17:50 +0000
To: public-webapps@w3.org
Message-ID: <E1LGMsi-0004rE-4l@bart.w3.org>

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.

Received on Saturday, 27 December 2008 00:18:24 UTC

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