Fix switching to different citation explorer view not resetting selection

This commit is contained in:
Adomas Venčkauskas 2025-09-24 11:14:28 +03:00
parent e05696acb2
commit 1ab1d34a88

View file

@ -166,10 +166,8 @@ window.ZoteroDocumentCitations = {
onSelectionChange={this.onCitationSelectionChange.bind(this)}
getRowString={index => this._renderedCitationRows[index].title}
/>);
domElem.addEventListener("focusout", (event) => {
if (event.relatedTarget && !event.relatedTarget.closest("#citation-list-container")) {
citationList?.selection.clearSelection()
}
domElem.addEventListener("focusin", (event) => {
itemList?.selection.clearSelection()
});
});
}
@ -196,10 +194,8 @@ window.ZoteroDocumentCitations = {
firstColumnExtraWidth: 28-16,
});
await itemList.waitForLoad();
domElem.addEventListener("focusout", (event) => {
if (event.relatedTarget && !event.relatedTarget.closest("#item-list-container")) {
itemList?.selection.clearSelection()
}
domElem.addEventListener("focusin", (event) => {
citationList?.selection.clearSelection()
});
}
await itemList.changeCollectionTreeRow({