Bug 10188

Summary: Form elements added via appendChild() are not accessible via form.element
Product: WebKit Reporter: Brian Hartsock <bhartsock>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: mrowe
Priority: P2 Keywords: HasReduction
Version: 418.x   
Hardware: Mac (PowerPC)   
OS: OS X 10.4   
Attachments:
Description Flags
Testcase
none
First attempt
none
fixing testcase mjs: review+

Description Brian Hartsock 2006-08-01 12:03:46 PDT
**Steps to reproduce
This bug is very similar to Bug 3481, except reproducing it is a little different.  To properly reproduce this bug, the form must be an orphan that has not yet been added to the document.body.  I used appendChild() instead of innerHTML in my test case, but the same results occur with innerHTML.

See attachment for testcase.

**Version
Safari version: 2.0.4 (419.3)

**Other browsers
Works in IE and Firefox
Comment 1 Brian Hartsock 2006-08-01 12:04:25 PDT
Created attachment 9796 [details]
Testcase
Comment 2 David Kilzer (:ddkilzer) 2006-08-01 12:45:38 PDT
(In reply to comment #0)
> **Version
> Safari version: 2.0.4 (419.3)

The "419.3" here is actually the Safari build, not the WebKit build.  The WebKit build is 418.8 for this version of Safari:

http://developer.apple.com/internet/safari/uamatrix.html

Brian, please try the nightly WebKit builds to see if the issue is already fixed in Subversion, and report back here.

http://nightly.webkit.org/

Thanks for taking the time to report this bug, and for creating a reduced test case!
Comment 3 David Kilzer (:ddkilzer) 2006-08-01 12:47:20 PDT
(In reply to comment #0)
> **Version
> Safari version: 2.0.4 (419.3)

Also note that the Safari version and build numbers DO NOT change when running with the WebKit nightly builds!  You must get the WebKit nightly build version (rNNNNN) off the DMG name.

Please report which version of the WebKit nightly, too!
Comment 4 Brian Hartsock 2006-08-01 12:59:07 PDT
Fails on nightly build as well.

Nightly build version: r15731
Comment 5 Mark Rowe (bdash) 2006-08-02 00:32:34 PDT
Confirmed with both WebKit r15750 and 418.8.  Works as expected in Firefox.
Comment 6 Rob Buis 2006-12-08 08:08:18 PST
Created attachment 11773 [details]
First attempt

This is one way of fixing the problem. Since I am not sure about how the document versions should work, I may need some more guidance :)
Cheers,

Rob.
Comment 7 Rob Buis 2006-12-08 08:28:36 PST
Created attachment 11774 [details]
fixing testcase

As Mitz pointed out, the testcase was way off, I was cleaning up code, but removed too much...
Cheers,

Rob.
Comment 8 Maciej Stachowiak 2006-12-08 15:15:07 PST
Comment on attachment 11774 [details]
fixing testcase

r=me
Comment 9 Rob Buis 2006-12-08 15:55:15 PST
Landed in r18090.