From 8616e7e193bd28c4b0442191d428976f968292d0 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sat, 26 Mar 2011 22:39:24 +0000 Subject: [PATCH] make sure notes get saved when switching quickly to another item (I think this is only a problem if the new item is a note) --- chrome/content/zotero/zoteroPane.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 17afc0d0d..5bdd8f36a 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -1039,6 +1039,11 @@ var ZoteroPane = new function() var tabs = document.getElementById('zotero-view-tabbox'); + // save note when switching from a note + if(document.getElementById('zotero-item-pane-content').selectedIndex == 2) { + document.getElementById('zotero-note-editor').save(); + } + // Single item selected if (this.itemsView && this.itemsView.selection.count == 1 && this.itemsView.selection.currentIndex != -1) {