diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index c73625ab4e..e4229f5ef3 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -6040,6 +6040,8 @@ var ZoteroPane = new function() continue; } + let allowedAttributes = (el.getAttribute('zotero-persist') || '').split(/[\s,]+/); + var elValues = serializedValues[id]; for (var attr in elValues) { // Ignore persisted collapsed state for collection and item pane splitters, since @@ -6050,6 +6052,11 @@ var ZoteroPane = new function() && Zotero.Prefs.get('reopenPanesOnRestart')) { continue; } + // Ignore attributes that are no longer persisted for the element + if (!allowedAttributes.includes(attr)) { + Zotero.debug(`Not restoring '${attr}' for #${id}`); + continue; + } if (["width", "height"].includes(attr)) { el.style[attr] = `${elValues[attr]}px`; } diff --git a/chrome/content/zotero/zoteroPane.xhtml b/chrome/content/zotero/zoteroPane.xhtml index cb32276cae..9db9132618 100644 --- a/chrome/content/zotero/zoteroPane.xhtml +++ b/chrome/content/zotero/zoteroPane.xhtml @@ -1228,7 +1228,7 @@ - + diff --git a/scss/elements/_itemDetails.scss b/scss/elements/_itemDetails.scss index 29fa03faee..749536f57c 100644 --- a/scss/elements/_itemDetails.scss +++ b/scss/elements/_itemDetails.scss @@ -12,8 +12,6 @@ .zotero-item-pane-content { min-height: 0; flex: 1; - width: auto !important; - height: auto !important; min-width: $min-width-item-pane; /* Need a min height to prevent layout issues in stacked mode */ min-height: 168px;