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 committed by Dan Stillman
parent 4ab154c4bf
commit 221aa25e00

View file

@ -244,7 +244,10 @@ var ZoteroContextPane = new function () {
} }
_contextPaneSplitter.setAttribute('hidden', false); _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(() => { setTimeout(() => {
_contextPane.setAttribute('collapsed', !(_contextPaneSplitter.getAttribute('state') != 'collapsed')); _contextPane.setAttribute('collapsed', !(_contextPaneSplitter.getAttribute('state') != 'collapsed'));
}); });