Viewerframe Mode Refresh Top -

setInterval(() => if (dashboardMode === 'auto_refresh_top') refreshTop(); , 5000); Even with a solid pattern, problems arise. Here is your troubleshooting guide. Issue 1: The "Scroll Flash" Symptoms: The viewerframe scrolls to top, then visually jumps down, then back up. Cause: Asynchronous rendering. The scrollTop = 0 runs before the new content is fully painted. Fix: Use requestAnimationFrame or setTimeout(..., 0) .

/* Ensure fresh renders start at top */ .viewerframe:mode-refresh scroll-behavior: auto; scroll-snap-type: none; viewerframe mode refresh top

document.getElementById('refreshBtn').addEventListener('click', refreshTop); if (dashboardMode === 'auto_refresh_top') refreshTop()

Advanced implementations use virtual scrolling (e.g., react-window or tanstack virtual ). Here, "refresh top" means resetting the virtual scroll index to 0 and discarding the cache. Even with a solid pattern