From 52bc93adc99cefca6df3b836cc603eb2f1af03a6 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Fri, 11 Mar 2022 13:39:26 -0800 Subject: [PATCH] Always select new items, disable File -> New Item appropriately Fixes #2405. This also fixes an issue where Cmd/Ctrl-Shift-N in a collection like Duplicate Items would open the item type menu on top of a blank white item pane (since the new item didn't get selected first). --- chrome/content/zotero/zoteroPane.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 7aa4cabe88..c0a9e15940 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -899,6 +899,9 @@ var ZoteroPane = new function() //set to Info tab document.getElementById('zotero-view-item').selectedIndex = 0; + // Ensure item is visible + yield this.selectItem(itemID); + if (manual) { // Update most-recently-used list for New Item menu this.addItemTypeToNewItemTypeMRU(Zotero.ItemTypes.getName(typeID)); @@ -1262,6 +1265,7 @@ var ZoteroPane = new function() "cmd_zotero_newCollection", "cmd_zotero_newSavedSearch", "zotero-tb-add", + "menu_newItem", "zotero-tb-lookup", "cmd_zotero_newStandaloneNote", "zotero-tb-note-add",