rem: if (gFoundLink) {   var suppressedScroll = document.commandDispatcher.suppressFocusScroll; document.commandDispatcher.suppressFocusScroll = true; gFoundLink.focus(); document.commandDispatcher.suppressFocusScroll = suppressedScroll; 
add:   var suppressedScroll = document.commandDispatcher.suppressFocusScroll; document.commandDispatcher.suppressFocusScroll = true;  try { if (gFoundLink) gFoundLink.focus(); else if (gCurrentWindow) gCurrentWindow.focus(); else window.content.focus(); 
context: function delayedCloseFindBar(){  var findField = document.getElementById("find-field");  var findToolbar = document.getElementById("FindToolbar");  var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]                     .getService(Components.interfaces.nsIWindowWatcher);  if (window == ww.activeWindow) {     var focusedElement = document.commandDispatcher.focusedElement;    if (focusedElement && focusedElement.parentNode &&          (focusedElement.parentNode == findToolbar ||           focusedElement.parentNode.parentNode == findField)) {      if (gFoundLink) {        // block scrolling on focus since find already scrolls, further        // scrolling is due to user action, so don't override this        var suppressedScroll = document.commandDispatcher.suppressFocusScroll;        document.commandDispatcher.suppressFocusScroll = true;        gFoundLink.focus();        document.commandDispatcher.suppressFocusScroll = suppressedScroll;      }      else        window.content.focus();    }  }  findToolbar.hidden = true;  setFindMode(FIND_NORMAL);  setFoundLink(null);  changeSelectionColor(false);  if (gQuickFindTimeout) {    clearTimeout(gQuickFindTimeout);    gQuickFindTimeout = null;      } }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/435550ca9d56f44a143ee7594699c0fc60d40a0b/findBar.js/clean/toolkit/components/typeaheadfind/content/findBar.js