Avoid content loss when immediately leaving item note in context pane

Fixes #3532
This commit is contained in:
Martynas Bagdonas 2023-12-14 17:59:28 +02:00
parent 32ba987c28
commit 3cb12a2ad3

View file

@ -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();