Closed
Bug 58213
Opened 25 years ago
Closed 24 years ago
selectNode returns same as selectNodeContents
Categories
(Core :: DOM: Core & HTML, defect, P5)
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
| Reporter | ||
Updated•25 years ago
|
Priority: P3 → P5
| Reporter | ||
Comment 1•25 years ago
|
||
Comment 3•25 years ago
|
||
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
| Reporter | ||
Comment 6•25 years ago
|
||
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
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
| Assignee | ||
Comment 10•24 years ago
|
||
| Assignee | ||
Comment 11•24 years ago
|
||
resolving bug as invalid
anthonyd
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 12•24 years ago
|
||
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() ?
| Assignee | ||
Comment 13•24 years ago
|
||
it just calls toString.
anthonyd
Updated•24 years ago
|
Component: DOM Level 2 → DOM Traversal-Range
Updated•12 years ago
|
Component: DOM: Traversal-Range → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•