--- advpoll-vote.js	2009-04-12 02:02:47.000000000 +1000
+++ advpoll-vote.js.new	2009-10-15 16:42:28.000000000 +1100
@@ -130,12 +130,16 @@ Drupal.behaviors.rankingDragAndDrop = fu
           var choiceNotType = isPending ? 'existing' : 'pending';
           var $choice = $element.parent('.advpoll-'+ choiceType +'-choice');
           var $pendingChoicesList = $('.advpoll-pending-choices-list', mainForm);
-          var $newChoice = $choice.clone(true)
-            // Migrate choice outer div.
-            .removeClass('advpoll-'+ choiceType + '-choice').addClass('advpoll-'+ choiceNotType + '-choice')
-            // Migrate action link.
-            .find("a.advpoll-choice-action-link").html(isPending ? stringRemoveFromVote : stringAddToVote).attr('href', isPending ? stringRemoveFromVoteURL : stringAddToVoteURL).removeClass(isPending ? 'advpoll-add-to-vote' : 'advpoll-remove-from-vote').addClass(isPending ? 'advpoll-remove-from-vote' : 'advpoll-add-to-vote').end();
-          // Unchained to avoid undefined parent JS error - unsure why needed.
+          var choiceParts = {
+            id: $choice.attr('id'),
+            children: $choice.children()
+          };
+          var $newChoice = $('<div id="' + choiceParts.id + '" class="advpoll-' + choiceNotType + '-choice"></div>')
+            .append( choiceParts.children )
+            .find("a.advpoll-choice-action-link").html(isPending ? stringRemoveFromVote : stringAddToVote)
+            .attr('href', isPending ? stringRemoveFromVoteURL : stringAddToVoteURL)
+            .removeClass(isPending ? 'advpoll-add-to-vote' : 'advpoll-remove-from-vote')
+            .addClass(isPending ? 'advpoll-remove-from-vote' : 'advpoll-add-to-vote').end();
           var $newRow = isPending ? $('<tr class="draggable advpoll-choice-container"><td class="advpoll-receive-choice"></td></tr>') : $('<li class="advpoll-receive-choice advpoll-choice-container"></li>');
           // TODO: unify these two cases into a single command.
           if (isPending) {
