Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#5829 closed bug (fixed)

appendTo broken in IE6

Reported by: DCameronMauch Owned by:
Priority: major Milestone: 1.4.2
Component: manipulation Version: 1.4.1
Keywords: Cc:
Blocked by: Blocking:

Description

$('select#left option:selected').remove().appendTo('select#right');

works in 1.3.2 with FF and IE6 with 1.4, still works with FF, but only appends first option with IE6

Change History (6)

comment:1 Changed 13 years ago by DCameronMauch

<html>

<head>

<script src="jquery.js"

type="text/javascript">

</script> <script>

$(document).ready(function(){

$('select#right').hide(); $('input#hide').click(function(){

$('select#left option:odd').remove().appendTo('select#right');

}); $('input#show').click(function(){

$('select#right option').remove().appendTo('select#left');

});

});

</script>

</head> <body>

<select id="left"

multiple size="6">

<option value="0">

Bird

</option> <option value="1">

Cat

</option> <option value="2">

Dog

</option> <option value="3">

Horse

</option> <option value="4">

Snake

</option> <option value="5">

Zebra

</option>

</select> <select id="right"

multiple size="6">

</select> <br> <input id="hide"

type="button" value="hide">

<input id="show"

type="button" value="show">

</body>

</html>

comment:2 Changed 13 years ago by akuzemchak

I'm seeing the same issue in IE 6, 7, and 8 with jQuery 1.4. I tried using the following code ($newItems is a group of <li>s, and $col is a <ul>):

$newItems.appendTo($col);

However, as stated above, this only brought over the first <li>. Doing it this way works perfectly as expected:

$col.append($newItems);

comment:3 Changed 13 years ago by akuzemchak

Also worth noting... both my example and DCameronMauch's are using appendTo() following a remove(). Perhaps that could help narrow down the possibilities.

comment:4 Changed 13 years ago by DCameronMauch

Still broken with jQuery 1.4.1. I use this method alot, so I can't switch until this is fixed... Is this not a serious enough bug for someone to at least look at?

comment:5 Changed 13 years ago by DCameronMauch

Verified - Issue only occurs when preceeded with remove().

comment:6 Changed 13 years ago by john

Component: coremanipulation
Milestone: 1.41.4.2
Resolution: fixed
Status: newclosed
Version: 1.41.4.1
Note: See TracTickets for help on using tickets.