From 3cb12a2ad3da1dca1d6a05a332d579e37b9cfbc4 Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Thu, 14 Dec 2023 17:59:28 +0200 Subject: [PATCH] Avoid content loss when immediately leaving item note in context pane Fixes #3532 --- chrome/content/zotero/contextPane.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome/content/zotero/contextPane.js b/chrome/content/zotero/contextPane.js index 48dd5957e2..0977d2cd74 100644 --- a/chrome/content/zotero/contextPane.js +++ b/chrome/content/zotero/contextPane.js @@ -818,6 +818,8 @@ var ZoteroContextPane = new function () { editor.item = item; editor.parentItem = null; editor.returnHandler = () => { + // Immediately save note content before vbox with note-editor iframe is destroyed below + editor.saveSync(); _panesDeck.setAttribute('selectedIndex', 1); _notesPaneDeck.selectedPanel.setAttribute('selectedIndex', 0); vbox.remove();