www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 2e5b87b9e7d2df2753654797731f99b0f56be62b
parent 47ab26553245d643a3144fecdefd683e0e406d21
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sun, 28 Aug 2011 22:15:39 +0000

Fix error when saving via browser context menu when Zotero pane/tab hasn't been opened


Diffstat:
Mchrome/content/zotero/zoteroPane.js | 16+++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js @@ -667,14 +667,14 @@ var ZoteroPane = new function() return false; } - // Currently selected row - if (row === undefined) { + // Make sure currently selected view is editable + if (row === undefined && this.collectionsView.selection) { row = this.collectionsView.selection.currentIndex; - } - - if (!this.canEdit(row)) { - this.displayCannotEditLibraryMessage(); - return; + + if (!this.canEdit(row)) { + this.displayCannotEditLibraryMessage(); + return; + } } if (row !== undefined) { @@ -704,8 +704,6 @@ var ZoteroPane = new function() //set to Info tab document.getElementById('zotero-view-item').selectedIndex = 0; - this.selectItem(itemID); - // Update most-recently-used list for New Item menu var mru = Zotero.Prefs.get('newItemTypeMRU'); if (mru) {