From d1648176f37179b02773ca6a49f5c08c57ea6ab9 Mon Sep 17 00:00:00 2001 From: Vit Horacek <36083550+mountiny@users.noreply.github.com> Date: Fri, 14 Jun 2024 23:17:01 +0200 Subject: [PATCH] Merge pull request #43743 from software-mansion-labs/dont-highlight-first-element-in-modal [CP Staging] Disable initial focus in modals (cherry picked from commit cda67335299a46281337b42864f8ea08d2a26ca5) --- src/components/FocusTrap/FocusTrapForModal/index.web.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/FocusTrap/FocusTrapForModal/index.web.tsx b/src/components/FocusTrap/FocusTrapForModal/index.web.tsx index 161e3f1b7f84..b06044404ee2 100644 --- a/src/components/FocusTrap/FocusTrapForModal/index.web.tsx +++ b/src/components/FocusTrap/FocusTrapForModal/index.web.tsx @@ -10,7 +10,7 @@ function FocusTrapForModal({children, active}: FocusTrapForModalProps) { focusTrapOptions={{ trapStack: sharedTrapStack, allowOutsideClick: true, - fallbackFocus: document.body, + initialFocus: false, }} > {children}