diff --git a/chrome/content/zotero/integration/citationDialog/searchHandler.mjs b/chrome/content/zotero/integration/citationDialog/searchHandler.mjs index 0462f97fd5..40816778c1 100644 --- a/chrome/content/zotero/integration/citationDialog/searchHandler.mjs +++ b/chrome/content/zotero/integration/citationDialog/searchHandler.mjs @@ -386,7 +386,10 @@ export class CitationDialogSearchHandler { for (let itemID of itemIDs) { let item = await Zotero.Items.getAsync(itemID); if (!item) continue; - if (item && item.parentItemID) { + // When inserting citations, tab item is a PDF, so we want to grab it's paren item. + // When inserting notes, we want to show the actual note + let isOpenNoteInNoteMode = this.dialogState.isAddingNote() && item.isNote(); + if (item.parentItemID && !isOpenNoteInNoteMode) { item = await Zotero.Items.getAsync(item.parentItemID); } items.push(item);