From 1db3fc0b4908d194d33ade91e8e94ac74a1eca42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Tue, 11 Feb 2020 15:24:30 +0200 Subject: [PATCH] Fix a benign citation dialog error when pressing ESC to quit --- chrome/content/zotero/integration/quickFormat.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index 453898a2a1..9bd63ac156 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -1181,6 +1181,10 @@ var Zotero_QuickFormat = new function () { if(!(yield _bubbleizeSelected()) && !_getEditorContent()) { _accept(); } + } else if (keyCode === event.DOM_VK_ESCAPE) { + // Handled in the event handler up, but we have to cancel it here + // so that we do not issue another _quickFormat call + return; } else if(keyCode === event.DOM_VK_TAB || event.charCode === 59 /* ; */) { event.preventDefault(); _bubbleizeSelected();