Improve attachment row annotation button click behavior

fix: #5249
This commit is contained in:
windingwind 2025-05-08 22:49:21 +02:00
parent 408f1274f4
commit 5bf460771c

View file

@ -107,20 +107,8 @@ import { getCSSItemTypeIcon } from 'components/icons';
};
_handleAnnotationClick = () => {
// TODO: jump to annotations pane
let pane;
if (ZoteroContextPane) {
pane = ZoteroContextPane.sidenav?.container.querySelector(`:scope > [data-pane="attachment-annotations"]`);
}
if (pane) {
pane._section.open = true;
}
let win = Zotero.getMainWindow();
if (win) {
win.ZoteroPane.selectItem(this._attachment.id);
win.Zotero_Tabs.select('zotero-pane');
win.focus();
}
Zotero_Tabs.select('zotero-pane');
ZoteroPane.selectItems(this._attachment.getAnnotations().map(a => a.id));
};
_handleRemove = async () => {