From 4f9e4bee8604d1a78d3f2bf8a1354800440d36d1 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 24 Oct 2019 01:36:01 -0400 Subject: [PATCH] Restore reopening of closed collection and item panes on startup When we added the View menu pane options in 3aeef69ad3, we removed automatic reopening of the panes on startup, since the View menu is more discoverable than the narrow collapsed splitters. Unfortunately we're now getting many reports of people not knowing where their panes are. It turns out the View menu pane options in 5.0.76 are actually broken, so it's not a great test, but enough people are doing this by accident and enough of them don't seem to be finding the View menu options (broken or otherwise) that I think it's better to return to reopening the panes. We can always add a hidden pref to change that behavior, but no one has complained in years, so it's probably not necessary. --- chrome/content/zotero/zoteroPane.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 6c5eb0f032..f0db9a6bbb 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -4996,6 +4996,13 @@ var ZoteroPane = new function() if(!el) return; var elValues = serializedValues[id]; for(var attr in elValues) { + // Ignore persisted collapsed state for collection and item pane splitters, since + // people close them by accident and don't know how to get them back + // TODO: Add a hidden pref to allow them to stay closed if people really want that? + if ((el.id == 'zotero-collections-splitter' || el.id == 'zotero-items-splitter') + && attr == 'state') { + continue; + } el.setAttribute(attr, elValues[attr]); } }