Make Esc in PDF recognizer window close rather than minimize if done
This commit is contained in:
parent
7c64666167
commit
5ed10c6ba2
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue