mirror of
https://github.com/zotero/zotero.git
synced 2026-10-06 02:50:03 +00:00
Focus title on shortcut key new item even if item type isn't changed
This commit is contained in:
parent
e132787774
commit
8bdac7015b
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue