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({ } 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) {