fix keyboard focus not landing on feeds itemTree (#4495)
Do not use specific "#item-tree-main-default" selector to find the itemTree node to focus since a different id can be set for the table, e.g for the list of feeds. Use a more general "zotero-items-tree .virtualized-table" selector to focus the itemTree on tab from quickSearch and on Escape keypress from an editable-text of itemPane. Fixes: #4494
This commit is contained in:
parent
256efd3195
commit
c5027106c2
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue