From f02b3464b807bc1c922590997aafb3d55396e357 Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Thu, 18 Mar 2021 10:04:33 +0200 Subject: [PATCH] Close note editor window when the note item is deleted --- chrome/content/zotero/note.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/content/zotero/note.js b/chrome/content/zotero/note.js index 3901d57b15..0daeae4aa6 100644 --- a/chrome/content/zotero/note.js +++ b/chrome/content/zotero/note.js @@ -120,6 +120,11 @@ function onUnload() { var NotifyCallback = { notify: function(action, type, ids){ if (noteEditor.item && ids.includes(noteEditor.item.id)) { + if (action == 'delete') { + window.close(); + return; + } + var noteTitle = noteEditor.item.getNoteTitle(); document.title = noteTitle;