Prefs: Add an event on pane switch
Fixes an issue with incomplete Style Manager tree rendering when switching panes. Closes #3239
This commit is contained in:
parent
836c8718b0
commit
4b16269b7f
2 changed files with 4 additions and 0 deletions
|
@ -244,6 +244,7 @@ var Zotero_Preferences = {
|
|||
}
|
||||
|
||||
pane.container.hidden = false;
|
||||
pane.container.children[0].dispatchEvent(new Event('showing'));
|
||||
|
||||
let backButton = document.getElementById('prefs-subpane-back-button');
|
||||
backButton.hidden = !pane.parent;
|
||||
|
|
|
@ -60,6 +60,9 @@ Zotero_Preferences.Cite = {
|
|||
}
|
||||
}
|
||||
await this.refreshStylesList();
|
||||
document.querySelector('#zotero-prefpane-cite').addEventListener('showing', () => {
|
||||
this._tree.invalidate();
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue