From aa57ce763a28e071b6f0f3a7f9fdf7e372c5683e Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Thu, 19 Feb 2026 00:13:15 +0300 Subject: [PATCH] Skip targets tab auto-refresh while color picker is open The 2-second auto-refresh was destroying the DOM and closing the native color picker popup. Now checks if an input inside the targets panel is focused before refreshing. Co-Authored-By: Claude Opus 4.6 --- server/src/wled_controller/static/js/features/tabs.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/src/wled_controller/static/js/features/tabs.js b/server/src/wled_controller/static/js/features/tabs.js index 2e85d21..04ebd1b 100644 --- a/server/src/wled_controller/static/js/features/tabs.js +++ b/server/src/wled_controller/static/js/features/tabs.js @@ -42,6 +42,9 @@ export function startAutoRefresh() { if (apiKey) { const activeTab = localStorage.getItem('activeTab') || 'dashboard'; if (activeTab === 'targets') { + // Skip refresh while user interacts with a picker or slider + const panel = document.getElementById('targets-panel-content'); + if (panel && panel.contains(document.activeElement) && document.activeElement.matches('input')) return; if (typeof window.loadTargetsTab === 'function') window.loadTargetsTab(); } else if (activeTab === 'dashboard') { if (typeof window.loadDashboard === 'function') window.loadDashboard();