rem: while (listbox.selectedItems.length > 0) { var selectedNode = listbox.selectedItems[0]; dump(selectedNode + " - " + listbox.selectedItems.length + "\n"); nextNode = selectedNode.nextSibling; 
add: var numSelectedItems = listbox.selectedItems.length; for (count = 0; count < numSelectedItems; count ++) { listbox.removeChild(listbox.selectedItems[0]); } 
context: function RemoveActiveCharset(){  var listbox = document.getElementById('active_charsets');  var nextNode = null;  var numSelected = listbox.selectedItems.length;  var deleted_all = false;  while (listbox.selectedItems.length > 0) {    var selectedNode = listbox.selectedItems[0];    dump(selectedNode + " - " + listbox.selectedItems.length + "\n");    nextNode = selectedNode.nextSibling;    if (!nextNode) {      if (selectedNode.previousSibling)        nextNode = selectedNode.previousSibling;    }    listbox.removeChild(selectedNode);  } //while  if (nextNode) {    listbox.selectItem(nextNode)  } else {    //listbox.clearSelection();  }  enable_save();} //RemoveActiveCharset
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/1a36976c908747b5471ca9ec38a7ebe59b9fbc1b/customizeCharset.js/clean/toolkit/content/customizeCharset.js