Closed
Bug 238904
Opened 20 years ago
Closed 20 years ago
Mozilla crashes when copying an element from a div element into the same element with JavaScript
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
DUPLICATE
of bug 238906
People
(Reporter: mozilla, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 An input type file is duplicated into a div element with JavaScript. Mozilla does NOT crash with other input types (like text), only with input type="file". code: --- <html> <head> <title>Causes mozilla 1.5 to crash</title> <script language="JavaScript" type="text/javascript"> <!-- function getHandle(myparam) { return(document.getElementById(myparam)); } function addToElement(target, source) { target.innerHTML+=source.innerHTML; } // (c) Gerben Versluis // 2004 - http://www.gerben.info --></script> </head> <body> <form enctype="multipart/form-data" method="POST" > <div id="form" style="position:relative; width:100%; border: 1px solid #000000;"> <span id="repeat"> <input type="file" name="upload[]"><br /> </span> </div> <input type="button" name="more" value="more" onclick="addToElement(getHandle('form'), getHandle('repeat'));"> </form> </body> </html> Reproducible: Always Steps to Reproduce: 1. Create a div with a span tag. Define <input type="file" name="upload[]"> in that span tag. 2. Do the following in JavaScript: divHandle.innerHTML+=spanHandle.innerHTML; 3. Done Actual Results: Complete crash Expected Results: Duplication of the existing span tag into the div tag with input type file.
*** This bug has been marked as a duplicate of 238906 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•