mirror of
https://github.com/zotero/zotero.git
synced 2026-10-04 02:31:47 +00:00
Let toolbar focus routing skip disabled plugin buttons
This commit is contained in:
parent
f55d038913
commit
a1d3eea8b2
2 changed files with 6 additions and 2 deletions
|
|
@ -178,8 +178,7 @@ var ZoteroPane = new function () {
|
|||
// toolbarbutton. Read the current buttons for each key event.
|
||||
let pluginButtons = () => [...document.querySelectorAll(
|
||||
'#zotero-items-toolbar > toolbarbutton[tabindex="0"]'
|
||||
)].filter(button => !button.disabled && !button.hidden
|
||||
&& getComputedStyle(button).display !== 'none');
|
||||
)];
|
||||
let titleBar = document.getElementById("zotero-title-bar");
|
||||
let itemTree = document.getElementById("zotero-items-tree");
|
||||
let collectionsTree = document.getElementById("zotero-collections-tree");
|
||||
|
|
|
|||
|
|
@ -1964,6 +1964,11 @@ describe("ZoteroPane", function () {
|
|||
buttons[0].style.display = 'none';
|
||||
paneToggle.dispatchEvent(tab);
|
||||
assert.equal(doc.activeElement, buttons[1]);
|
||||
buttons[0].style.display = '';
|
||||
buttons[0].disabled = true;
|
||||
doc.getElementById('zotero-tb-add').focus();
|
||||
buttons[0].dispatchEvent(tab);
|
||||
assert.equal(doc.activeElement, buttons[1]);
|
||||
}
|
||||
finally {
|
||||
buttons.forEach(button => button.remove());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue