diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index e76f6b82a1..7b75e60bed 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -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"); diff --git a/test/tests/zoteroPaneTest.js b/test/tests/zoteroPaneTest.js index 87e63e8574..a3f92d272b 100644 --- a/test/tests/zoteroPaneTest.js +++ b/test/tests/zoteroPaneTest.js @@ -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());