diff --git a/chrome/content/zotero/elements/itemDetails.js b/chrome/content/zotero/elements/itemDetails.js index 379eb40b66..4c03a0fb71 100644 --- a/chrome/content/zotero/elements/itemDetails.js +++ b/chrome/content/zotero/elements/itemDetails.js @@ -568,7 +568,7 @@ // On Escape/Enter on editable-text, return focus to the item tree or reader if (event.key == "Escape" || (event.key == "Enter" && event.target.classList.contains('input'))) { if (isLibraryTab) { - document.getElementById('item-tree-main-default').focus(); + document.querySelector('#zotero-items-tree .virtualized-table').focus(); } else { let reader = Zotero.Reader.getByTabID(Zotero_Tabs.selectedID); diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 428d555e29..17c59252d6 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -407,7 +407,7 @@ var ZoteroPane = new function() ShiftTab: () => { document.getElementById("zotero-tb-search")._searchModePopup.flattenedTreeParentNode.focus(); }, - Tab: () => document.getElementById('item-tree-main-default') + Tab: () => itemTree.querySelector(".virtualized-table") }, 'zotero-tb-search-dropmarker': { ArrowNext: () => null,