Closed Bug 189467 Opened 23 years ago Closed 23 years ago

Node.nextSibling does not get nextSibling

Categories

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

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 26179

People

(Reporter: declercq.bart, Assigned: jst)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 In an onclick event I do "var obj = obj.nextSibling;", I expect the next node but in stead get something else (obj.nodeType gives "3" as the response. Doing var obj = obj.nextSibling.nextSibling; gets me to the nextSibling correctly and the DomInspector shows a #text "object" as the first node following my <h1></h1>. Placing the tags on one line gives the correct result. Reproducible: Always Steps to Reproduce: 1.Create a HTML document with two sibling elements in the body, with a CR/LF between them. 2. in the onclick event of the first element, retrieve the nextSibling and examine it. Actual Results: It apparently retrieves the CR/LF as a Node in the DOM-tree. Expected Results: CR/LF should be ignored as whitespace
The nextSibling is correct.... *** This bug has been marked as a duplicate of 26179 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.