Can't set [object Text] of caption created with createCaption()

VERIFIED INVALID

Status

()

Core
DOM
VERIFIED INVALID
17 years ago
17 years ago

People

(Reporter: Jan Carpenter, Assigned: jst)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
Overview Description: 
I can create a Caption and when I check I see there is an [object Text]; however 
I can't set it to any text.


Steps to Reproduce: 
- see attached test case

Actual Results: 
When I try to set the caption text, I can no longer execute javaScript, and the 
text is not set.

Expected Results: 
Expect to be able to set and see the text as a caption

Build Date & Platform Bug Found: 
2001-02-13-06-Mtrunk : Win32

Additional Builds and Platforms Tested On: 
2001-02-19-06-Mtrunk : Linux
2001-02-19-04-Mtrunk : Mac
(Reporter)

Comment 1

17 years ago
Created attachment 26239 [details]
attaching testcase
The issue is that when the caption is created it has no firstchild.  So
t.caption.firstChild is null, and the js fails.  Adding 

t.caption.appendChild(document.createTextNode(""));

right before

t.caption.firstChild.nodeValue="This is the new caption text.";

makes the testcase work the way it should.

If all createCaption() does is create a new caption element, this is the correct
behavior....
(Reporter)

Comment 3

17 years ago
doh!  My bad, thanks Boris!
Marking invalid.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → INVALID

Comment 4

17 years ago
QA contact Update
QA Contact: janc → desale

Comment 5

17 years ago
VERIFIED invalid
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.