From 4c063e7b6eb537ce3ea901623edd0723db116e4e 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 7a3c87127a..3c6db3fae8 100644 --- a/chrome/content/zotero/contextPane.js +++ b/chrome/content/zotero/contextPane.js @@ -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')); });