Bug Tracker

Ticket #3716 (closed bug: wontfix)

Opened 6 years ago

Last modified 6 years ago

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
Blocking: Blocked by:

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>

Change History

comment:1 Changed 6 years ago by flesler

  • Cc bryanhart added
  • Owner flesler deleted
  • Component changed from unfilled to core

comment:2 Changed 6 years ago by dmethvin

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>

comment:3 Changed 6 years ago by brandon

  • Status changed from new to closed
  • Resolution set to wontfix

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.

Note: See TracTickets for help on using tickets.