1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-02-14 23:18:21 +00:00
This commit is contained in:
Aidan Timson
2026-02-09 12:46:20 +00:00
parent 47dbf4b53c
commit 2089e7f705

View File

@@ -407,13 +407,9 @@ export class SectionsView extends LitElement implements LovelaceViewElement {
}
}
private _getScrollContainer(): Element | null {
// The scroll container is the hui-view-container parent
return this.closest("hui-view-container");
}
private _toggleView() {
const scrollContainer = this._getScrollContainer();
// The scroll container is the hui-view-container parent
const scrollContainer = this.closest("hui-view-container");
const scrollTop = scrollContainer?.scrollTop ?? 0;
// Save current scroll position