Allow visible dashboard screenshots while unfocused

Relax screenshot request gating to depend on tab visibility only, so thumbnail updates continue when the dashboard tab is visible but the window is not focused.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
GitHub Copilot
2026-02-14 19:59:55 +00:00
parent d526fa1860
commit 218aabc8ca
+1 -1
View File
@@ -1137,7 +1137,7 @@ func (s *LocalServer) handleRoot(w http.ResponseWriter, r *http.Request) {
document.addEventListener('keydown', handleKeydown); document.addEventListener('keydown', handleKeydown);
function dashboardCanRequestScreenshots() { function dashboardCanRequestScreenshots() {
return document.visibilityState === 'visible' && document.hasFocus(); return document.visibilityState === 'visible';
} }
function onDashboardFocusChanged() { function onDashboardFocusChanged() {