From 268aad212bee15281d979f47ec8ee3d5f567ce2a Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 25 Dec 2006 09:06:42 +0000 Subject: [PATCH] Addresses #414, it is possible to edit the "extra" field and another field simultaneously But don't break the independent note tags view Also fix another tags error in that view A lot of item pane logic really needs to be put in bindings, somehow... --- chrome/content/zotero/itemPane.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/itemPane.js b/chrome/content/zotero/itemPane.js index 3dae579ac..d813c242a 100644 --- a/chrome/content/zotero/itemPane.js +++ b/chrome/content/zotero/itemPane.js @@ -865,7 +865,9 @@ var ZoteroItemPane = new function() function showEditor(elem) { // Blur any active fields - _dynamicFields.focus(); + if (_dynamicFields) { + _dynamicFields.focus(); + } //Zotero.debug('Showing editor'); @@ -1038,7 +1040,10 @@ var ZoteroItemPane = new function() // Return focus to items pane if (!lastTag) { - document.getElementById('zotero-items-tree').focus(); + var tree = document.getElementById('zotero-items-tree'); + if (tree) { + tree.focus(); + } } return false; @@ -1049,7 +1054,10 @@ var ZoteroItemPane = new function() target.blur(); // Return focus to items pane - document.getElementById('zotero-items-tree').focus(); + var tree = document.getElementById('zotero-items-tree'); + if (tree) { + tree.focus(); + } return false;