From c083c69be11ae7cd8a454ed26e819d2ca68564ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Wed, 23 Mar 2022 11:58:06 +0200 Subject: [PATCH] Fix note insertion dialog not appearing when classic mode is enabled. Closes #2463 --- chrome/content/zotero/xpcom/integration.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 3929d5c5af..625948e862 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -1428,22 +1428,20 @@ Zotero.Integration.Session.prototype.cite = async function (field, addNote=false ); Zotero.debug(`Editing citation:`); Zotero.debug(JSON.stringify(citation.toJSON())); - - if (Zotero.Prefs.get("integration.useClassicAddCitationDialog")) { + + var mode = (!Zotero.isMac && Zotero.Prefs.get('integration.keepAddCitationDialogRaised') + ? 'popup' : 'alwaysRaised')+',resizable=false'; + if (addNote) { + Zotero.Integration.displayDialog('chrome://zotero/content/integration/insertNoteDialog.xul', + mode, io); + } + else if (Zotero.Prefs.get("integration.useClassicAddCitationDialog")) { Zotero.Integration.displayDialog('chrome://zotero/content/integration/addCitationDialog.xul', 'alwaysRaised,resizable', io); } else { - var mode = (!Zotero.isMac && Zotero.Prefs.get('integration.keepAddCitationDialogRaised') - ? 'popup' : 'alwaysRaised')+',resizable=false'; - if (addNote) { - Zotero.Integration.displayDialog('chrome://zotero/content/integration/insertNoteDialog.xul', - mode, io); - } - else { - Zotero.Integration.displayDialog('chrome://zotero/content/integration/quickFormat.xul', - mode, io); - } + Zotero.Integration.displayDialog('chrome://zotero/content/integration/quickFormat.xul', + mode, io); } // -------------------