diff --git a/src/components/TagInput.tsx b/src/components/TagInput.tsx index 5f348e12..c7f7b4b3 100644 --- a/src/components/TagInput.tsx +++ b/src/components/TagInput.tsx @@ -89,7 +89,7 @@ export default function TagInput({ // Focus option in the DOM when selected index changes useEffect(() => { if (selectedOptionIndex !== undefined) { - const options = optionsRef.current?.querySelectorAll('div'); + const options = optionsRef.current?.querySelectorAll(':scope > div'); const option = options?.[selectedOptionIndex] as HTMLElement | undefined; option?.focus(); }