Bug Tracker

Modify

Ticket #5829 (closed bug: fixed)

Opened 3 years ago

Last modified 14 months ago

appendTo broken in IE6

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

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

comment:1 Changed 3 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 3 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 3 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 3 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 3 years ago by DCameronMauch

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

comment:6 Changed 3 years ago by john

  • Status changed from new to closed
  • Resolution set to fixed
  • Version changed from 1.4 to 1.4.1
  • Component changed from core to manipulation
  • Milestone changed from 1.4 to 1.4.2

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.