Open item pane if closed on New Item
This commit is contained in:
parent
8e4fd75f1d
commit
1427e3e324
1 changed files with 8 additions and 5 deletions
|
@ -1319,6 +1319,12 @@ var ZoteroPane = new function()
|
|||
}
|
||||
});
|
||||
|
||||
// Expand the item pane if it's closed
|
||||
var itemPane = document.getElementById("zotero-item-pane");
|
||||
if (itemPane.getAttribute("collapsed") == "true") {
|
||||
itemPane.setAttribute("collapsed", false)
|
||||
}
|
||||
|
||||
//set to Info tab
|
||||
document.getElementById('zotero-view-item').selectedIndex = 0;
|
||||
|
||||
|
@ -1328,11 +1334,8 @@ var ZoteroPane = new function()
|
|||
if (manual) {
|
||||
// Update most-recently-used list for New Item menu
|
||||
this.addItemTypeToNewItemTypeMRU(Zotero.ItemTypes.getName(typeID));
|
||||
// Focus the title field if the itemPane is expanded
|
||||
let itemPane = document.getElementById("zotero-item-pane");
|
||||
if (!itemPane.getAttribute("collapsed")) {
|
||||
document.getElementById('zotero-item-pane-header').querySelector("editable-text").focus();
|
||||
}
|
||||
// Focus the title field
|
||||
document.getElementById('zotero-item-pane-header').querySelector("editable-text").focus();
|
||||
}
|
||||
|
||||
return Zotero.Items.getAsync(itemID);
|
||||
|
|
Loading…
Reference in a new issue