From 39e92bacb3a889ad0aecf816360c64c4f62a6f4c Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 7 Aug 2013 13:17:25 -0400 Subject: [PATCH] Focus title field when creating new item via menu or shortcut key --- chrome/content/zotero/zoteroPane.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 784e4780ff..953a8cc5e2 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -658,6 +658,8 @@ var ZoteroPane = new function() var handleTypeChange = function () { self.addItemTypeToNewItemTypeMRU(this.itemTypeMenu.value); itemBox.removeHandler('itemtypechange', handleTypeChange); + // Focus the title field after menu closes + itemBox.focusFirstField(); }; // Only update the MRU when the menu is opened for the // keyboard shortcut, not on subsequent opens @@ -765,8 +767,11 @@ var ZoteroPane = new function() //set to Info tab document.getElementById('zotero-view-item').selectedIndex = 0; - // Update most-recently-used list for New Item menu if (manual) { + // Focus the title field + document.getElementById('zotero-editpane-item-box').focusFirstField(); + + // Update most-recently-used list for New Item menu this.addItemTypeToNewItemTypeMRU(typeID); }