Ticket #5758 (closed bug: duplicate)
Manipulation in IE7 drops value of radio buttons
| Reported by: | Pierre | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | manipulation | Version: | 1.3.2 |
| Keywords: | ie7 manipulation move radio checked value lost | Cc: | |
| Blocking: | Blocked by: |
Description
<html>
<head>
<title>Manipulation in IE7 drops value of radio buttons</title>
<script type="text/javascript" src=" http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<form>
<h1>Manipulation in IE7 drops value of radio buttons</h1>
<p>Instructions : check "female", then click button.</p>
<p>In Firefox, the checked radio is kept -- That's correct.<br />
In IE, the checked radio is lost -- That's the bug.</p>
<button type="button">Click to move both radio buttons down.</button>
<h2>Source</h2>
<div id="source">
<input type="radio" name="sex" value="male" checked="checked" /> Male
<input type="radio" name="sex" value="female" /> Female
</div>
<h2>Target</h2>
<div id="target"> </div>
</form>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
var source = $("#source");
var target = $("#target");
target.after(source);
/* the same happens also with before, insertAfter, and insertBefore */
});
});
</script>
</body>
</html>
Attachments
Change History
Changed 3 years ago by Pierre
-
attachment
ie7_radio.html
added
comment:2 Changed 3 years ago by dmethvin
Closest open ticket I can find is #3879, most likely it's a similar cause so I'll cross-reference it there.
comment:3 Changed 3 years ago by Pierre
The value of the radio buttons disappear also when performing .wrap() or .unwrap() on their container.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Demo of the bug (open me in IE7)