context: function onBrowserKeyPress(evt){    // Check focused elt  if (!shouldFastFind(evt))    return;    var findField = document.getElementById("find-field");  if (gFindMode != FIND_NORMAL && gQuickFindTimeout) {        if (evt.keyCode == KeyEvent.DOM_VK_BACK_SPACE) {      if (findField.value) {        findField.value = findField.value.substr(0, findField.value.length - 1);        gIsBack = true;           gBackProtectBuffer = 3;      }      else if (gBackProtectBuffer > 0) {        gBackProtectBuffer--;      }            if (gIsBack || gBackProtectBuffer > 0)        evt.preventDefault();              find(findField.value);    }    else if (evt.keyCode == KeyEvent.DOM_VK_ESCAPE) {      closeFindBar();      evt.preventDefault();    }    else if (evt.charCode) {      if (evt.charCode == CHAR_CODE_SPACE)        evt.preventDefault();              findField.value += String.fromCharCode(evt.charCode);      find(findField.value);    }    return;  }    if (evt.charCode == CHAR_CODE_APOSTROPHE || evt.charCode == CHAR_CODE_SLASH ||      (gUseTypeAheadFind && evt.charCode && evt.charCode != CHAR_CODE_SPACE)) {    gFindMode = (evt.charCode == CHAR_CODE_APOSTROPHE ||                 (gTypeAheadLinksOnly && evt.charCode != CHAR_CODE_SLASH))                ? FIND_LINKS : FIND_TYPEAHEAD;    toggleLinkFocus(true);    if (openFindBar()) {            setFindCloseTimeout();            if (gUseTypeAheadFind &&          evt.charCode != CHAR_CODE_APOSTROPHE &&          evt.charCode != CHAR_CODE_SLASH) {        gTypeAheadFindBuffer += String.fromCharCode(evt.charCode);                findField.value = gTypeAheadFindBuffer;        find(findField.value);      }      else {        findField.value = "";      }    }    else {      if (gFindMode == FIND_NORMAL) {        // XXXldb This code appears unreachable.        selectFindBar();              focusFindBar();      }      else {        findField.value = String.fromCharCode(evt.charCode);        find(findField.value);      }    }          }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/d86737608541e2376c25955aca1e4d08cd8e29cc/findBar.js/clean/toolkit/components/typeaheadfind/content/findBar.js