rem: if (event.target.localName != "treecell" && event.target.localName != "treeitem") 
add: if (t.localName != "treecell" && t.localName != "treeitem") 
context: function ClickOnOtherPanels(event){   debug("ClickOnOtherPanels(...)");  var targetclass = event.target.getAttribute('class');  var treeitem = null;  var force_open = true;  if (targetclass == 'tree-cell-twisty') {    // The twisty is nested three below the treeitem:    // <treeitem>    //   <treerow>    //     <treecell>    //         <titledbutton class="tree-cell-twisty"> <!-- anonymous -->    treeitem = event.target.parentNode.parentNode.parentNode;    force_open = false;  } else {    if (event.target.localName != "treecell" &&        event.target.localName != "treeitem")    return;    treeitem = event.target;    while (treeitem && treeitem.nodeName != 'treeitem') {      treeitem = treeitem.parentNode;    }  }    // Remove the selection in the "current" panels list  var current_panels = document.getElementById('current-panels');  current_panels.clearItemSelection();  enable_buttons_for_current_panels();  if (treeitem.getAttribute('container') == 'true') {    if (treeitem.getAttribute('open') == 'true') {      if (force_open) {        debug("close the container");        treeitem.removeAttribute('open');      }    } else {      if (force_open) {        debug("open the container");        treeitem.setAttribute('open','true');      }      link = treeitem.getAttribute('link');      loaded_link = treeitem.getAttribute('loaded_link');      if (link != '' && !loaded_link) {        debug("Has remote datasource: "+link);        add_datasource_to_other_panels(link);        treeitem.setAttribute('loaded_link', 'true');      } else {        setTimeout('fixup_children("'+ treeitem.getAttribute('id') +'")', 100);      }    }  }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/2dd48d146506e688631ec6dabd95c8cc686129bd/customize.js/buggy/suite/common/sidebar/customize.js