Closed Bug 295677 Opened 20 years ago Closed 13 years ago

uncaught exception with range.commonAncestorContainer in this case with removed nodes

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: martijn.martijn, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

With the upcoming testcase, I get this js error in the console: Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMRange.commonAncestorContainer]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/Documents%20and%20Settings/mw22/Bureaublad/x.htm :: <TOP_LEVEL> :: line 13" data: no] I would have expect an alert box with the text "two".
Attached file testcase
You remove the boundary points of the range from the document, and then expect to find some common ancestor container? The removed nodes have no relation to each other, either. INVALID.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Yep. This is a valid bug report. Please read the code and the spec again carefully, Alex.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
It should fail on the first SetXXX() call, since the nodes aren't in a Document, DocumentFragment, or Attr node. So this is a bug, but not quite the reported one.
Assignee: traversal-range → nobody
QA Contact: ian → traversal-range
It alerts "two" for me now. This should be tested, though.
Status: REOPENED → RESOLVED
Closed: 20 years ago13 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
Component: DOM: Traversal-Range → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: