Bug 10486 - Deeply cloned nodes w/forms have invalid form elements
Summary: Deeply cloned nodes w/forms have invalid form elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 419.x
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-18 12:32 PDT by Tom Duffey
Modified: 2007-01-15 06:32 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Duffey 2006-08-18 12:32:32 PDT
Clone a node with a form and that form's elements array is always empty.  Similar to Bug 10188.

Test case:

<html>
    <head>
        <script type="text/javascript">
            function test() {
                var form = document.getElementById("testForm");
                alert("Original elements.length: " + form.elements.length);
                var clone = form.cloneNode(true);
                alert("Clone elements.length: " + clone.elements.length);
            }
        </script>
    </head>
    <body>
        <form action="" id="testForm">
            <input name="foo" type="text" value=""/>
        </form>

        <a href="javascript:test();">clone form and count elements</a>
    </body>
</html>
Comment 1 Alexey Proskuryakov 2007-01-15 06:32:41 PST
I cannot reproduce this with nightly r18858.

I suppose that the fix for bug 10188 fixed this, too.