mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 14:00:37 +00:00
🐛 Keep assets list view scroll position across sidebar tabs (#12115)
In list view the height of each component row depended on its thumbnail, which renders deferred. When the Assets tab mounted again, rows were shorter until the thumbnails appeared, so the restored scrollTop landed several rows further down and scroll anchoring kept it there. Reserve the thumbnail height in the row grid so rows keep their size from the first render. Closes #11971 AI-assisted-by: claude-opus-5-5
This commit is contained in:
parent
fcbb8f1fc0
commit
d046f6997d
@ -69,6 +69,10 @@
|
||||
.component-item-list {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
|
||||
// The thumbnail renders deferred; reserve its height so rows keep their
|
||||
// size on mount and the saved sidebar scroll lands on the same item.
|
||||
grid-template-rows: $sz-40;
|
||||
align-items: center;
|
||||
column-gap: var(--sp-s);
|
||||
padding: var(--sp-xxs);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user