Don't throw if the user types before the window finishes initializing

This commit is contained in:
Simon Kornblith 2012-02-16 07:44:02 -05:00
parent eeacdc7391
commit 2296d1f6ac

View file

@ -978,7 +978,7 @@ var Zotero_QuickFormat = new function () {
* Handle return or escape * Handle return or escape
*/ */
function _onQuickSearchKeyPress(event) { function _onQuickSearchKeyPress(event) {
qfGuidance.hide(); if(qfGuidance) qfGuidance.hide();
var keyCode = event.keyCode; var keyCode = event.keyCode;
if(keyCode === event.DOM_VK_RETURN || keyCode === event.DOM_VK_ENTER) { if(keyCode === event.DOM_VK_RETURN || keyCode === event.DOM_VK_ENTER) {