You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: dispatch scroll event on view switch to fix empty file list
The .files-list element is the actual scroll container (confirmed via
DOM inspection — scrollTop > 0 on .files-list when scrolled, not on
window or #app-content-vue).
When switching between list and grid view, the virtual scroll does not
automatically recalculate visible rows for the new item sizes, leaving
a blank screen until the user manually scrolls.
Fix: watch for files-list--grid class changes on .files-list via
MutationObserver, then dispatch a synthetic scroll event on the same
element via setTimeout so CSS has fully reflowed before the event fires.
This triggers the virtual scroll to recalculate visible rows at the
current position without changing the user's scroll position.
0 commit comments