Skip to content

Commit

Permalink
remove all the previous select while changing module pos (#24260)
Browse files Browse the repository at this point in the history
  • Loading branch information
bahl24 authored and HLeithner committed Apr 2, 2019
1 parent cbb30ec commit 5d707da
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion media/system/js/moduleorder.js
Expand Up @@ -39,7 +39,11 @@
}

// Remove previous <select>, it will be recreated by writeDynaList()
$("#" + $id).remove();
var $previous = $("#" + $id);
if ($previous.data('chosen')){
$previous.chosen('destroy');
}
$previous.remove();

writeDynaList('name="' + $name + '" id="' + $id +'"' + $attr, $orders, $originalPos, $originalPos, $originalOrder, $element);

Expand Down

0 comments on commit 5d707da

Please sign in to comment.