Skip to content

Fully autonomous AI Agents system capable of performing complex penetration testing tasks

fix(webui): re-check focus before stealing it in DetailNavigationSheet

Sergey Kozyrenko5a7bdca4ac89
diff --git a/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.tsx b/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.tsx
index fba58137..001af8d9 100644
--- a/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.tsx
+++ b/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.tsx
@@ -173,6 +173,11 @@ export function DetailNavigationSheet<T extends { id: string }>({
}
const id = requestAnimationFrame(() => {
+ // Focus may have returned to the search input since the effect's gate check.
+ if (document.activeElement === searchInputRef.current) {
+ return;
+ }
+
const node = buttonRefs.current.get(focusedId);
if (!node) {