rem: userList.clearSelection (); 
add: if (userList.treeBoxObject.selection) userList.treeBoxObject.selection.clearSelection (); 
context: function setCurrentObject (obj){    if (!obj.messages)    {        dd ("** INVALID OBJECT passed to setCurrentObject **");        return;    }    if (("currentObject" in client && client.currentObject == obj) ||        !("output" in client) || !client.output)        return;            var tb, userList;    if ("currentObject" in client && client.currentObject)    {        tb = getTabForObject(client.currentObject);    }    if (tb)    {        tb.selected = false;        tb.setAttribute ("state", "normal");    }        if (client.output.firstChild)        client.output.removeChild (client.output.firstChild);    client.output.appendChild (obj.messages);    /* Unselect currently selected users. */    userList = document.getElementById("user-list");    /* Remove curently selection items before this tree gets rerooted,     * because it seems to remember the selections for eternity if not. */    userList.clearSelection ();    if (obj.TYPE == "IRCChannel")        client.rdf.setTreeRoot ("user-list", obj.getGraphResource());    else        client.rdf.setTreeRoot ("user-list", client.rdf.resNullChan);    client.currentObject = obj;    tb = getTabForObject(obj);    if (tb)    {        tb.selected = true;        tb.setAttribute ("state", "current");    }        var vk = Number(tb.getAttribute("viewKey"));    delete client.activityList[vk];    updateNetwork();    updateChannel();    updateTitle ();    if (client.PRINT_DIRECTION == 1)    {        scrollDown();        setTimeout ("scrollDown()", 500);        setTimeout ("scrollDown()", 1000);        setTimeout ("scrollDown()", 2000);    }        onTopicEditEnd();    if (client.currentObject.TYPE == "IRCChannel")        client.statusBar["channel-topic"].setAttribute ("editable", "true");    else        client.statusBar["channel-topic"].removeAttribute ("editable");    var status = document.getElementById("offline-status");    if (client.currentObject == client)    {        status.setAttribute ("hidden", "true");    }    else    {        status.removeAttribute ("hidden");        var details = getObjectDetails(client.currentObject);        if ("network" in details && details.network.isConnected())            status.removeAttribute ("offline");            else            status.setAttribute ("offline", "true");    }}
meta: 1622	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1622/e837fe69c82167a5ae52b3107182da72b6a4d791/static.js/buggy/xul/content/static.js