[Webkit-unassigned] [Bug 23601] DOMSelection.getRangeAt() returns a different range than the selection

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 5 14:36:24 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=23601





------- Comment #8 from eric at webkit.org  2009-02-05 14:36 PDT -------
(In reply to comment #7)
> (In reply to comment #4)
> > Why oh why would toRange chose to modify the Selection instead of just
> > returning the range?
> 
> I think the reason is that Selection positions may be invalid in DOM sense, so
> calling rangeCompliantEquivalent() is necessary. As Justin says, the validate()
> call during selection creation is the real culprit.
> 
> See also: bug 15256 and the many related ones.


The real culprit for this bug is definitely toRange().  Looking at the test
output, the selection is as expected, when it's converted to a range, since
it's a "caret" it's pushed out of the empty text node by explicit code in
toRange().


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list