Closed Bug 117818 Opened 23 years ago Closed 23 years ago

Selection does not work for range in reverse document order

Categories

(Core :: DOM: Selection, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: hjtoi-bugzilla, Assigned: mjudge)

Details

If you create a range object where the start point is after end point (i.e. in reverse document order), adding the range to the selection object does not seem to do anything. I found this out while implementing FIXptr (see bug 74800).
it is not legal to make a range with its start after its end. this is in the DOM specs for range.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Hmm, section 2.4 in http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113/ranges.html states that "The start position of a Range is guaranteed to never be after the end position. To enforce this restriction, if the start is set to be at a position after the end, the Range is collapsed to that position. Similarly, if the end is set to be at a position before the start, the Range is collapsed to that position. " Does our range impl support this or do we create a whacky range object (against the spec)?
You need to log in before you can comment on or make changes to this bug.