Safari 3.1.1 $jq.remove() losing select options
Below pasted from mailing list:
http://groups.google.com/group/jquery-ui/browse_thread/thread/7299825dd298bfcb#
I've run into what looks to be a bug with Safari 3.1.1/jquery-ui-1.5.
I have a select menu with options that is removed from the DOM and
later re-inserted. If ui.core.js has been included, then the select
menu loses one of its options each time it is removed. Below is some
HTML that demonstrates the problem.
-lenny
<html>
<head>
<script type="text/javascript" src="jquery-1.2.6.js"></script>
<!--
- With the ui.core.js inclusion commented, the select menu will
properly
- include NORMAL and URGENT when you hit the 'Insert'.
- Once you include ui.core.js, each time $target is
- removed it loses one option from the select menu in Safari 3.1.1
<script type="text/javascript" src="ui.core.js"></script>
-->
<script type="text/javascript">
$(document).ready(function() {
$target = $('#target').remove();
$('#insert').click(function() {
$('#dest').append($target);
$target.show();
});
$('#remove').click(function() {
$target.remove();
});
});
</script>
</head>
<body>
<div id="target" style="display: none;">
<select name="task_priority" id="task_priority">
<option value="NORMAL">Normal</option>
<option value="URGENT">Urgent</option>
</select>
</div>
<div>
<form>
<div id="dest">
<a id="insert" href="javascript: void(0);">Insert</a>
<a id="remove" href="javascript: void(0);">Remove</a>
<br/><br/>
</div>
</form>
</body>
</html>
Change History (5)
Priority: |
major →
critical
|
Resolution: |
→ fixed
|
Status: |
new →
closed
|
Fixed in r399.