commit 8bdac7015be46ae834565949738b76ca01340740
parent e1327877749cbace21d551d2e62d22a56fd26890
Author: Dan Stillman <dstillman@zotero.org>
Date: Wed, 7 Aug 2013 20:24:20 -0400
Focus title on shortcut key new item even if item type isn't changed
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js
@@ -658,14 +658,14 @@ 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
var removeTypeChangeHandler = function () {
itemBox.removeHandler('itemtypechange', handleTypeChange);
itemBox.itemTypeMenu.firstChild.removeEventListener('popuphiding', removeTypeChangeHandler);
+ // Focus the title field after menu closes
+ itemBox.focusFirstField();
};
itemBox.addHandler('itemtypechange', handleTypeChange);
itemBox.itemTypeMenu.firstChild.addEventListener('popuphiding', removeTypeChangeHandler);