Make Esc in PDF recognizer window close rather than minimize if done
This commit is contained in:
parent
7c64666167
commit
5ed10c6ba2
|
@ -135,7 +135,13 @@ let Zotero_RecognizePDF_Dialog = new function () {
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
_progressWindow.addEventListener('keypress', function (e) {
|
_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);
|
_progressWindow.addEventListener('close', close.bind(this), false);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user