rem: view.selection.select(0); 
add:  if (view.rowCount > 0) view.selection.select(0);  
context:     function filterCookies()    {      var filter = document.getElementById("filter").value;      if (filter == "") {        gCookiesWindow.clearFilter();        return;      }              var view = gCookiesWindow._view;      view._filterSet = gCookiesWindow._filterCookies(filter);      if (!view._filtered) {        // Save Display Info for the Non-Filtered mode when we first        // enter Filtered mode.         gCookiesWindow._saveState();        view._filtered = true;      }      // Move to multi-select in the tree      gCookiesWindow._tree.setAttribute("seltype", "multiple");            // Clear the display      var oldCount = view._rowCount;      view._rowCount = 0;      gCookiesWindow._tree.treeBoxObject.rowCountChanged(0, -oldCount);      // Set up the filtered display      view._rowCount = view._filterSet.length;      gCookiesWindow._tree.treeBoxObject.rowCountChanged(0, view.rowCount);            view.selection.select(0);      document.getElementById("cookiesIntro").value = gCookiesWindow._bundle.getString("cookiesFiltered");      document.getElementById("clearFilter").disabled = false;    }
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/6a6d7ddb144434cd65e5f86bdef38f8897c3c06e/cookies.js/clean/browser/components/preferences/cookies.js