mirror of
https://github.com/zotero/zotero.git
synced 2026-10-04 02:31:47 +00:00
citation dlg: fix collectionTree rendering (#5114)
After switching from list mode to library mode if the selected collection row is close to the bottom. Fixes: #5104
This commit is contained in:
parent
a98d172cd7
commit
92d6e69b6e
1 changed files with 5 additions and 2 deletions
|
|
@ -290,10 +290,13 @@ class Layout {
|
|||
if (this.forceUpdateTablesAfterRefresh && this.type == "library") {
|
||||
this.forceUpdateTablesAfterRefresh = false;
|
||||
setTimeout(() => {
|
||||
libraryLayout.collectionsView?.tree.invalidate();
|
||||
libraryLayout.itemsView.tree?.invalidate();
|
||||
libraryLayout.collectionsView?.tree.forceUpdate();
|
||||
libraryLayout.itemsView.tree?.forceUpdate();
|
||||
// Necessary for the collectionTree to be properly rendered after switching to library mode
|
||||
if (libraryLayout.collectionsView) {
|
||||
let currentCollectionIndex = libraryLayout.collectionsView.tree.selection.focused;
|
||||
libraryLayout.collectionsView.ensureRowIsVisible(currentCollectionIndex);
|
||||
}
|
||||
}, 250);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue