tabs menu update and minor refactoring
- tabs menu button is disabled when no reader tabs are opened - tabs menu popup will be hidden if all tabs are closed - keypress event handling moved from tabBar.jsx to zoteroPane.js because all other keyboard navigation events are handled there and it already has the functionality to skip disabled or hidden components (e.g. tabs menu button, sync error) - minor tweaks to tests to wait for collection search bar to hide to get keyboard navigation tests passing
This commit is contained in:
parent
a2e8294389
commit
8c0116d1db
4 changed files with 52 additions and 51 deletions
|
@ -1533,11 +1533,14 @@ describe("ZoteroPane", function() {
|
|||
doc.activeElement.dispatchEvent(shiftTab);
|
||||
// Wait for collection search to be revealed
|
||||
if (id === "zotero-collections-search") {
|
||||
await Zotero.Promise.delay(300);
|
||||
await Zotero.Promise.delay(250);
|
||||
}
|
||||
assert.equal(doc.activeElement.id, id);
|
||||
// Wait for collection search to be hidden for subsequent tests
|
||||
if (id === "zotero-tb-collection-add") {
|
||||
await Zotero.Promise.delay(50);
|
||||
}
|
||||
}
|
||||
|
||||
doc.activeElement.dispatchEvent(shiftTab);
|
||||
assert.equal(doc.activeElement.className, "tab selected");
|
||||
|
||||
|
@ -1561,7 +1564,7 @@ describe("ZoteroPane", function() {
|
|||
doc.activeElement.dispatchEvent(tab);
|
||||
// Wait for collection search to be revealed
|
||||
if (id === "zotero-collections-search") {
|
||||
await Zotero.Promise.delay(300);
|
||||
await Zotero.Promise.delay(250);
|
||||
}
|
||||
assert.equal(doc.activeElement.id, id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue