Prevent delayed context pane expansion and pdf-reader rerender/resize when switching from library tab

This commit is contained in:
Martynas Bagdonas 2022-07-12 17:58:17 +03:00
parent 07f1517712
commit 4c063e7b6e

View file

@ -247,7 +247,10 @@ var ZoteroContextPane = new function () {
}
_contextPaneSplitter.setAttribute('hidden', false);
// It seems that on heavy load (i.e. syncing) the line below doesn't set the correct value
_contextPane.setAttribute('collapsed', !(_contextPaneSplitter.getAttribute('state') != 'collapsed'));
// It seems that on heavy load (i.e. syncing) the line below doesn't set the correct value,
// therefore we repeat the same operation at the end of JS message queue
setTimeout(() => {
_contextPane.setAttribute('collapsed', !(_contextPaneSplitter.getAttribute('state') != 'collapsed'));
});