It seems to me that previousSibling and nextSibling should point to the next element, rather than the whitespace between elements. Mozilla seems to think that the whitespace (in this testcase, tab and carriage return/linefeed) contitutes an element, and so points to that as the previous or next sibling. In contrast, IE reports the previous or next <LI> element as the siblings. (I'm not saying IE is wonderful, just pointing out how it interprets things.) -dave
A couple of things i forgot to mention: 1. This occurs in lastest builds from CVS. 2. I noticed that Johnny commented in Bug #31560 that this is what Mozilla does, but didn't really explain why.. It seems to me that what users and the DOM would expect would to be ignore the whitespace. I don't mind this bug being marked a dup of 31560 if you can show me where in the DOM spec that the whitespace/text between elements counts as far as siblings are concerned. Maybe it's something that isn't covered in the DOM, but i think it would be good to highlight the fact that Mozilla does implement this differently to other browsers (if it is indeed implementing it correctly) -dave
See also bug 26179.
*** This bug has been marked as a duplicate of 26179 ***
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
Component: DOM: Core → DOM: Core & HTML
QA Contact: jcarpenter0524 → general
You need to log in before you can comment on or make changes to this bug.