Make preferences less janky, preload panes on hover, allow panes to delay visibility until promise resolves (#3363)
Prevents flashes of unlocalized labels and controls without values set. Makes switching panes feel speedier overall because of preloading. I thought there was an issue for the flashes of uninitialized content but can't find it now.
This commit is contained in:
parent
b79e0b3d71
commit
85cade3fb2
5 changed files with 90 additions and 44 deletions
|
@ -113,14 +113,7 @@ var loadPrefPane = async function (paneName) {
|
|||
var win = await loadWindow("chrome://zotero/content/preferences/preferences.xhtml", {
|
||||
pane: id
|
||||
});
|
||||
var doc = win.document;
|
||||
while (true) {
|
||||
var pane = doc.getElementById(id);
|
||||
if (pane) {
|
||||
break;
|
||||
}
|
||||
await delay(1);
|
||||
}
|
||||
await win.Zotero_Preferences.waitForFirstPaneLoad();
|
||||
return win;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue