JavaScript's property firstChild does not return correct node

RESOLVED DUPLICATE of bug 26179

Status

()

Firefox
General
RESOLVED DUPLICATE of bug 26179
13 years ago
13 years ago

People

(Reporter: W-Mark Kubacki, Unassigned)

Tracking

({regression})

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1

JavaScript's property firstChild does not return correct node. Corresponding
code either says the (existing and defined) node is "undefined".

Reproducible: Always

Steps to Reproduce:
Use this snipplet:

<dd onclick="alert(this.firstChild.tagName)">
<dl>Something</dl>
<dt>the definition</dt>
</dd>

Same with TABLE and TR, TD etc.

Actual Results:  
It says "undefined".

Expected Results:  
Say "DL".

This works in IE and prior versions to Firefox 1.4 beta 1 (i.e. Deer Park alphas).

Comment 1

13 years ago
firstChild in this testcase is a text node (containing a line break character).
 I wonder why this worked before.
Keywords: regression
(Reporter)

Comment 2

13 years ago
This bug exists in FF 1.0.7.

Comment 3

13 years ago
I see the same behavior on trunk and a build from just before Deer Park Alpha 2.
 I'm not convinced this is a regression.  Probably just a dup of bug 26179.

*** This bug has been marked as a duplicate of 26179 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Keywords: regression
Resolution: --- → DUPLICATE
(Reporter)

Comment 4

13 years ago
Works if line-break after DD is removed (as in the URL).
You need to log in before you can comment on or make changes to this bug.