Closed Bug 58213 Opened 25 years ago Closed 24 years ago

selectNode returns same as selectNodeContents

Categories

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

x86
Windows 2000
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: mail, Assigned: anthonyd)

Details

Attachments

(2 files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; m18) Gecko/20001009 BuildID: 2000100908 The DOM 2 Range method selectNode() is expected to return a node, but instead returns the contents of the node, which is what would be expected instead for selectNodeContents. Reproducible: Always Steps to Reproduce: 1. Create Range 2. Range.selectNode(in Node n) 3. Range contains text, not a node Actual Results: Returns contents Expected Results: Returns a node testcase to follow
Priority: P3 → P5
Attached file testcase
Anthony, one more range bug for you.
Assignee: jst → anthonyd
reporter: are you still seeing this on new builds?
I'll work on this, no problem, but why am I suddenly getting Range bugs assigned to me? anthonyd
ignore my previous comment, i guess editor is responsible for range, oops! anthonyd
I see the same problem in 20001031 on Win2k... the testcase should be returning a node, but is instead returning the node contents. There is an increase in Range bugs as I went through the Range spec last week and tested each method and attribute... jst said to assign them to you. Should I post individual bugs for each of the non-implemented Range features, or leave them as the the one general bug, http://bugzilla.mozilla.org/show_bug.cgi?id=30838 ?
Dylan, The general rule is one issue one bug, one bug that says fix all of range, is/might be really more than one issue. Please go ahead and file a bug against ME on each range bug you fine. Thanks, anthonyd
confirmign bugs per reporter
Status: UNCONFIRMED → NEW
Ever confirmed: true
Dylan, range.selectNode() and selectNodeContents() are setting the range correctly. In your sample file the alert call is converting the range to a string. the toString call does not print block elements (ie. <p> or <div>) just the contents. attaching test case to demonstrate.
Status: NEW → ASSIGNED
Attached file test case
resolving bug as invalid anthonyd
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
I see, I did not know that alert would not print block level elements. Is that conversion on purpose, or a bug/limitation of alert() ?
it just calls toString. anthonyd
Component: DOM Level 2 → DOM Traversal-Range
VERIFIED invalid
Status: RESOLVED → VERIFIED
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: