Fix regression that broke section opening animation

This commit is contained in:
Abe Jellinek 2023-12-07 16:10:29 -05:00 committed by Dan Stillman
parent e04ef87929
commit 632870683b

View file

@ -47,9 +47,7 @@
let open = this.open;
if (open === val || this.empty) return;
this.render();
if (this._head?.nextSibling
&& this._head.nextSibling.getBoundingClientRect().height
&& this._head.nextSibling.scrollHeight) {
if (!this._restoringOpenState && this._head?.nextSibling?.scrollHeight) {
this.style.setProperty('--open-height', `${this._head.nextSibling.scrollHeight}px`);
}
else {
@ -240,7 +238,9 @@
}
_restoreOpenState() {
this._restoringOpenState = true;
this.open = Zotero.Prefs.get(`panes.${this.dataset.pane}.open`) ?? true;
this._restoringOpenState = false;
}
_runWithTransitionsDisabled(fn) {