commit 39e92bacb3a889ad0aecf816360c64c4f62a6f4c
parent 9d3f55be5193763d4c6d2afc3ddecea0bf5a9f39
Author: Dan Stillman <dstillman@zotero.org>
Date: Wed, 7 Aug 2013 13:17:25 -0400
Focus title field when creating new item via menu or shortcut key
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git 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);
}