IE10 and custom sort bug

Hi guys~
I run a custom sort function on my tree when an item is added or renamed. However, in IE10 sorting seems to “freeze” the tree (onClick won’t fire, expanding the tree won’t fire, etc). I am using 3.6 PRO.

Has anyone else run into this?

Regards,
Laurie

Hi
Do you mean sorting in TreeGrid?

No, I am using just dhtmlxtree (not the grid).
I am applying a custom sort (sorted by node type (a userdata attribute) then alphabetically) when a user adds a new node or renames a current node.
When the user hit’s Enter to complete the edit, the onEdit completes and the tree is sorted correctly. However the blinking cursor is left on the first node and the onClick events won’t fire after that.
When the user clicks on another node (to complete the edit as well), the tree never gets sorted at all (IE10 only)

function onEditCallback(state, id, tree, value) {
  tree.focusItem(id);

  if (state == 0) {
    return true;
  }
  if(state == 1)
  {               
    this._editCell.span.childNodes[0].select();               
    return true;
  }
  if(state == 2) //editor about to close
  {           
    var regex = new RegExp("^[\\w\\-\\' ]+$");
    if ($.trim(value) == "") {
      return false;
    }
    if(regex.text(value)){
      return true;
    }
    else{
      return false;
    }

    return true;
  }
  if(state == 3)
  {
    tree.enableItemEditor(false);
    tree.sortTree(id, 'ASC', false);
   }            
}

function customSort(a, b)
{
  var type1 = tree.getUserData(a, "nType");
  var type2 = tree.getUserData(b, "nType");

  if(type1<type2){
    return -1;
  }
  else if(type1 == type2){
    return sortByName(tree.getItemText(a), tree.getItemText(b));
  }
  else{
     return 1;
  }
}

function sortByName(a, b)
{
  var text1 = a.toLowerCase();
  var text2 = b.toLowerCase();
            
  if(text1>text2)
  {
    return 1;
  }
  if(text1<text2)
   {
    return -1;
  }
  if(text1 == text2) {
    return 0;
  }          
 }

Could you provide us your html or js file with this code? This part is not enough to test your issue.