From 221aa25e00416371df9449931908efddcd8713f6 Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Tue, 12 Jul 2022 17:58:17 +0300 Subject: [PATCH] Prevent delayed context pane expansion and pdf-reader rerender/resize when switching from library tab --- chrome/content/zotero/contextPane.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/contextPane.js b/chrome/content/zotero/contextPane.js index 9d908b6afc..679eb6801d 100644 --- a/chrome/content/zotero/contextPane.js +++ b/chrome/content/zotero/contextPane.js @@ -244,7 +244,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')); });