From 69f0ddb64795a00909be83db9f7957cc1da6694e Mon Sep 17 00:00:00 2001 From: Bogdan Abaev Date: Tue, 28 Apr 2026 09:37:17 -0700 Subject: [PATCH] fix open child note not showing in library mode --- .../zotero/integration/citationDialog/searchHandler.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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);