After new item creation, focus title in itemBox (#4113)
When item is created manually, title field in itemBox will be focused instead of the title in the itemPane as before. If the itemBox is collapsed, it will be opened. Added 'open' setter to item pane section for brevity Fixes #4111
This commit is contained in:
parent
c01b3ae270
commit
be1c890051
4 changed files with 21 additions and 15 deletions
|
@ -18,9 +18,8 @@ describe("ZoteroPane", function() {
|
|||
describe("#newItem", function () {
|
||||
it("should create an item and focus the title field", function* () {
|
||||
yield zp.newItem(Zotero.ItemTypes.getID('book'), {}, null, true);
|
||||
let title = doc.getElementById('zotero-item-pane-header').querySelector("editable-text");
|
||||
assert.equal(doc.activeElement.getAttribute("aria-label"), title.getAttribute("aria-label"));
|
||||
title.blur();
|
||||
assert.equal(doc.activeElement.closest("editable-text").id, "itembox-field-value-title");
|
||||
doc.activeElement.blur();
|
||||
yield Zotero.Promise.delay(1);
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue