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.
This commit is contained in:
Dan Stillman 2019-10-24 01:36:01 -04:00
parent 52fd91950d
commit 81b1adcfd9

View file

@ -4930,6 +4930,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]);
}
}