Bug 10188 - Form elements added via appendChild() are not accessible via form.element
Summary: Form elements added via appendChild() are not accessible via form.element
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 418.x
Hardware: Mac (PowerPC) OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2006-08-01 12:03 PDT by Brian Hartsock
Modified: 2006-12-08 15:55 PST (History)
1 user (show)

See Also:


Attachments
Testcase (606 bytes, text/html)
2006-08-01 12:04 PDT, Brian Hartsock
no flags Details
First attempt (3.09 KB, patch)
2006-12-08 08:08 PST, Rob Buis
no flags Details | Formatted Diff | Diff
fixing testcase (3.13 KB, patch)
2006-12-08 08:28 PST, Rob Buis
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.