Bug Tracker

Modify

Ticket #9629 (closed bug: invalid)

Opened 2 years ago

Last modified 5 weeks ago

Cloning a radio button

Reported by: Nik Owned by: Nik
Priority: low Milestone: 1.next
Component: manipulation Version: 1.6.1
Keywords: Cc:
Blocking: Blocked by:

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

comment:1 Changed 2 years ago by rwaldron

  • Owner set to Nik
  • Priority changed from undecided to low
  • Status changed from new to pending
  • Component changed from unfiled to manipulation

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.

comment:2 Changed 23 months ago by trac-o-bot

  • Status changed from pending to closed
  • Resolution set to invalid

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:3 Changed 9 months ago by robert.laroe@…

This remains an issue in 1.8.1

comment:4 Changed 9 months ago by dmethvin

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 5 weeks ago by m_gol

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.