rem: Xinha.prototype.activeElement = function(sel) { if ( ( sel === null ) || this.selectionEmpty(sel) ) { return null; }     if ( !sel.isCollapsed ) { if ( sel.anchorNode.childNodes.length > sel.anchorOffset && sel.anchorNode.childNodes[sel.anchorOffset].nodeType == 1 ) { return sel.anchorNode.childNodes[sel.anchorOffset]; } else if ( sel.anchorNode.nodeType == 1 ) { return sel.anchorNode; } else { return null; } } return null; 
add: Xinha.prototype.activeElement=function(sel){ if((sel===null)||this.selectionEmpty(sel)){ return null; } if(!sel.isCollapsed){ if(sel.anchorNode.childNodes.length>sel.anchorOffset&&sel.anchorNode.childNodes[sel.anchorOffset].nodeType==1){ return sel.anchorNode.childNodes[sel.anchorOffset]; }else{ if(sel.anchorNode.nodeType==1){ return sel.anchorNode; }else{ return null; } } } return null; 
context: Xinha.prototype.activeElement = function(sel){  if ( ( sel === null ) || this.selectionEmpty(sel) )  {    return null;  }  // For Mozilla we just see if the selection is not collapsed (something is selected)  // and that the anchor (start of selection) is an element.  This might not be totally  // correct, we possibly should do a simlar check to IE?  if ( !sel.isCollapsed )  {          if ( sel.anchorNode.childNodes.length > sel.anchorOffset && sel.anchorNode.childNodes[sel.anchorOffset].nodeType == 1 )    {      return sel.anchorNode.childNodes[sel.anchorOffset];    }    else if ( sel.anchorNode.nodeType == 1 )    {      return sel.anchorNode;    }    else    {      return null; // return sel.anchorNode.parentNode;    }  }  return null;};
meta: 6015	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6015/d8776708e0e10dfa0ab6ee1d0fa9e512d8d16348/Gecko.js/buggy/packages/acs-templating/www/resources/xinha-nightly/modules/Gecko/Gecko.js