Fix item pane blank (#5207)

This is caused by the persisted splitter state value to be blank from either older versions of client or plugins.
Resetting the empty values fixes this bug.
This commit is contained in:
windingwind 2025-04-16 07:53:03 +02:00 • committed by GitHub
parent 246005a097
commit 0bff70b186
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6650,6 +6650,12 @@ var ZoteroPane = new function()
&& Zotero.Prefs.get('reopenPanesOnRestart')) {
continue;
}
// For some reason, the persisted state of the splitter is empty. This will cause
// the splitter to behave unexpectedly. We set it to 'collapsed' here.
if (["zotero-context-splitter-stacked", "zotero-context-splitter"].includes(el.id)
&& attr === 'state' && elValues[attr] === '') {
elValues[attr] = 'collapsed';
}
// Ignore attributes that are no longer persisted for the element
if (!allowedAttributes.includes(attr)) {
Zotero.debug(`Not restoring '${attr}' for #${id}`);