www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 5ed10c6ba21dc64f61af4711492e19249a6ab335
parent 7c64666167819c91597942f4457088b0c3c0566e
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 23 Feb 2018 02:38:01 -0500

Make Esc in PDF recognizer window close rather than minimize if done

Diffstat:
Mchrome/content/zotero/recognizePDFDialog.js | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/recognizePDFDialog.js b/chrome/content/zotero/recognizePDFDialog.js @@ -135,7 +135,13 @@ let Zotero_RecognizePDF_Dialog = new function () { }, false); _progressWindow.addEventListener('keypress', function (e) { - if (e.keyCode === KeyEvent.DOM_VK_ESCAPE) close(); + if (e.keyCode === KeyEvent.DOM_VK_ESCAPE) { + // If done processing, Esc is equivalent to Close rather than Minimize + if (Zotero.RecognizePDF.getTotal() == Zotero.RecognizePDF.getProcessedTotal()) { + Zotero.RecognizePDF.cancel(); + } + close(); + } }); _progressWindow.addEventListener('close', close.bind(this), false);