From e42880b088b39b273ab843681aba879b07b13640 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Wed, 6 Jan 2021 11:28:20 -0300 Subject: [PATCH] Adding delay for dynamic --- lib/focus-trap.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/focus-trap.tsx b/lib/focus-trap.tsx index b0c7be31f..688ac562e 100644 --- a/lib/focus-trap.tsx +++ b/lib/focus-trap.tsx @@ -37,7 +37,7 @@ export default function FocusTrap({ children, focusFirst = false }: Props) { console.log('-----------', i) match = !!tabbable(root.current).length if (match) { - const delay = i === 0 ? 0 : 100 + const delay = i === 0 ? 0 : 200 setTimeout(() => { tabbable(root.current)[0].focus() }, delay)