mirror of
https://github.com/zotero/zotero.git
synced 2026-08-28 05:25:31 +00:00
Fix stale references to old item tree DOM id
After the item tree refactor, the items tree id became "item-tree-main" instead of "item-tree-main-default". Update the remaining call sites, restoring collection highlighting on Ctrl/Option, focusing the item tree after Add Item by Identifier, and Shift-Tab focus movement from the item tree to the toolbar (which only still worked due to the native tab order).
This commit is contained in:
parent
36e25d171a
commit
a7d001fc1d
2 changed files with 3 additions and 3 deletions
|
|
@ -147,7 +147,7 @@ var Zotero_Lookup = new function () {
|
|||
// Send the focus to the item tree after the popup closes
|
||||
ZoteroPane.lastFocusedElement = null;
|
||||
document.getElementById("zotero-lookup-panel").hidePopup();
|
||||
document.getElementById("item-tree-main-default").focus();
|
||||
document.getElementById("item-tree-main").focus();
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -438,7 +438,7 @@ var ZoteroPane = new function () {
|
|||
|
||||
itemTree.addEventListener("keydown", (event) => {
|
||||
let actionsMap = {
|
||||
'item-tree-main-default': {
|
||||
'item-tree-main': {
|
||||
ShiftTab: () => document.getElementById('zotero-tb-toggle-item-pane-stacked')
|
||||
}
|
||||
};
|
||||
|
|
@ -1066,7 +1066,7 @@ var ZoteroPane = new function () {
|
|||
else {
|
||||
enableHighlight = !event.shiftKey && !event.metaKey && event.key == "Control" && !event.altKey;
|
||||
}
|
||||
let isItemTreeFocused = document.activeElement.id == "item-tree-main-default";
|
||||
let isItemTreeFocused = document.activeElement.id == "item-tree-main";
|
||||
// Only highlight collections when itemTree is focused to try to avoid
|
||||
// conflicts with other shortcuts
|
||||
if (enableHighlight && isItemTreeFocused) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue