Revert "fx115: fix element width/height persist (#3944)"
This reverts commit ecea550a37
.
It seems to be causing various UI issues, including the items list
sliding under the item pane when the collections pane is expanded
(though I can no longer reproduce that).
This commit is contained in:
parent
81eb0b51bc
commit
0da1702589
3 changed files with 4 additions and 9 deletions
|
@ -27,7 +27,7 @@
|
||||||
{
|
{
|
||||||
class ItemPane extends XULElementBase {
|
class ItemPane extends XULElementBase {
|
||||||
content = MozXULElement.parseXULToFragment(`
|
content = MozXULElement.parseXULToFragment(`
|
||||||
<deck id="zotero-item-pane-content" class="zotero-item-pane-content" selectedIndex="0" flex="1">
|
<deck id="zotero-item-pane-content" class="zotero-item-pane-content" selectedIndex="0" flex="1" zotero-persist="width height" height="300">
|
||||||
<item-message-pane id="zotero-item-message" />
|
<item-message-pane id="zotero-item-message" />
|
||||||
|
|
||||||
<item-details id="zotero-item-details" />
|
<item-details id="zotero-item-details" />
|
||||||
|
|
|
@ -5996,7 +5996,7 @@ var ZoteroPane = new function()
|
||||||
this.unserializePersist = function () {
|
this.unserializePersist = function () {
|
||||||
_unserialized = true;
|
_unserialized = true;
|
||||||
var serializedValues = Zotero.Prefs.get("pane.persist");
|
var serializedValues = Zotero.Prefs.get("pane.persist");
|
||||||
if (!serializedValues) return;
|
if(!serializedValues) return;
|
||||||
serializedValues = JSON.parse(serializedValues);
|
serializedValues = JSON.parse(serializedValues);
|
||||||
|
|
||||||
for (var id in serializedValues) {
|
for (var id in serializedValues) {
|
||||||
|
@ -6007,7 +6007,7 @@ var ZoteroPane = new function()
|
||||||
}
|
}
|
||||||
|
|
||||||
var elValues = serializedValues[id];
|
var elValues = serializedValues[id];
|
||||||
for (var attr in elValues) {
|
for(var attr in elValues) {
|
||||||
// Ignore persisted collapsed state for collection and item pane splitters, since
|
// 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
|
// 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?
|
// TODO: Add a hidden pref to allow them to stay closed if people really want that?
|
||||||
|
@ -6016,9 +6016,6 @@ var ZoteroPane = new function()
|
||||||
&& Zotero.Prefs.get('reopenPanesOnRestart')) {
|
&& Zotero.Prefs.get('reopenPanesOnRestart')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (["width", "height"].includes(attr)) {
|
|
||||||
el.style[attr] = `${elValues[attr]}px`;
|
|
||||||
}
|
|
||||||
el.setAttribute(attr, elValues[attr]);
|
el.setAttribute(attr, elValues[attr]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6027,8 +6024,7 @@ var ZoteroPane = new function()
|
||||||
// may not yet be initialized
|
// may not yet be initialized
|
||||||
try {
|
try {
|
||||||
this.itemsView.sort();
|
this.itemsView.sort();
|
||||||
}
|
} catch(e) {};
|
||||||
catch (e) {}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
height: auto !important;
|
|
||||||
min-width: $min-width-item-pane;
|
min-width: $min-width-item-pane;
|
||||||
/* Need a min height to prevent layout issues in stacked mode */
|
/* Need a min height to prevent layout issues in stacked mode */
|
||||||
min-height: 168px;
|
min-height: 168px;
|
||||||
|
|
Loading…
Reference in a new issue