fix: preserve scroll position in cached grid views
display:none discards scrollTop in WebKitGTK, so navigating away from album/artist/genre grids and back reset scroll to top. Replace inline style.display toggling with a CSS class that uses visibility:hidden + height:0 + overflow:hidden. This collapses the element visually while keeping the DOM alive with its scroll state intact. contain:strict on hidden views ensures zero layout cost while collapsed.
This commit is contained in:
@@ -152,3 +152,14 @@ body div.sidebar {
|
||||
height: 100%;
|
||||
contain: layout style paint;
|
||||
}
|
||||
|
||||
/* Hidden cached views: use visibility+size collapse instead of
|
||||
display:none so scroll containers preserve their scrollTop.
|
||||
display:none discards scroll state in WebKitGTK. */
|
||||
.main-panel > .view-hidden {
|
||||
visibility: hidden !important;
|
||||
height: 0 !important;
|
||||
overflow: hidden !important;
|
||||
pointer-events: none !important;
|
||||
contain: strict !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user