#9629 closed bug (invalid)
Cloning a radio button
Reported by: | Nik | Owned by: | Nik |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | manipulation | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
1.4.2, 1.6.1. A primary radio button element loses a "checked" attribute. In GH clone also loses it. FF 3.6.17, GH, Opera 9.64 - fail. IE6 - success.
<!DOCTYPE html> <html> <head>
<script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript">
$(function(){
$('button[name="clone1"]').click(function(){
var newRadio = $('input:eq(0)').clone(); newRadio.appendTo('body');
});
});
</script>
</head> <body> <div>
<input type="radio" checked="checked" name="test"/> <button name="clone1">Clone Radio Button</button>
</div> </body> </html>
Change History (6)
comment:1 Changed 12 years ago by
Component: | unfiled → manipulation |
---|---|
Owner: | set to Nik |
Priority: | undecided → low |
Status: | new → pending |
comment:2 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
comment:4 Changed 10 years ago by
Yet we still don't have a test case. Can you provide one please, and let us know which browsers didn't work as expected?
comment:6 Changed 10 years ago by
This is correct behavior. Since those checkboxes belong to the same "group" (i.e. share the same name attribute), only one of them is allowed to be selected. IE6 is wrong here.
Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, I've created this boilerplate: http://jsfiddle.net/rwaldron/da3nM/ Open the link and click to "Fork" in the top menu.