Skip to main content

Bug Tracker

Side navigation

#3716 closed bug (wontfix)

Opened December 15, 2008 10:00PM UTC

Closed March 17, 2009 09:59PM UTC

clone() on forms does not copy password input values in ie

Reported by: bryanhart Owned by:
Priority: major Milestone: 1.3
Component: core Version: 1.2.6
Keywords: clone form password input Cc: bryanhart
Blocked by: Blocking:
Description

In IE, after cloning a form, values for password inputs are not copied over. Works as expected in FF3 and Safari 3.

Example:

<form id='form'>
  <input name='password' type='password' value='xyz' />
</form>
<script>
  alert($('#form').clone().find('[name=password]').val());
</script>
Attachments (0)
Change History (3)

Changed December 16, 2008 12:40PM UTC by flesler comment:1

cc: → bryanhart
component: unfilledcore
owner: flesler

Changed December 23, 2008 07:48PM UTC by dmethvin comment:2

This bug isn't specific to jQuery, it seems to be due to IE's DOM cloneNode operation:

<form id="xform">
<input type="password" name="secret" value="stuff">
</form>
<script>
 alert(document.getElementById("xform").cloneNode(true).innerHTML);
</script>

Changed March 17, 2009 09:59PM UTC by brandon comment:3

resolution: → wontfix
status: newclosed

Cloning form element values along with a form is something we used to have in core but removed due to the immense overhead it had. The various browsers are not sure what to do with the cloned form element either. The implications are more than just skin deep.