From 51996b537d55849259d185a0d597887b3f75888d Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Mon, 13 Aug 2018 23:14:18 +0800 Subject: [PATCH] Force description when submitting a recognizer report (#1547) --- chrome/content/zotero/zoteroPane.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 509c7cf461..bc9ec75927 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -4672,12 +4672,17 @@ var ZoteroPane = new function() if(!items.length) return; let input = {value: ''}; - Services.prompt.prompt( - null, - Zotero.getString('recognizePDF.reportMetadata'), - Zotero.getString('general.describeProblem'), - input, null, {} - ); + let confirmed; + do { + confirmed = Services.prompt.prompt( + null, + Zotero.getString('recognizePDF.reportMetadata'), + Zotero.getString('general.describeProblem'), + input, null, {} + ); + } while(confirmed && !input.value); + + if(!confirmed) return; try { await Zotero.RecognizePDF.report(items[0], input.value);