From 5c09c820fbf3b87263d5cc4c7776b7dcebd2ba7f Mon Sep 17 00:00:00 2001 From: Sam Winslow Date: Mon, 10 May 2021 12:34:58 -0400 Subject: [PATCH] Change event target criteria for outside click (#4290) --- frontend/src/lib/components/SelectGradientOverflow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/lib/components/SelectGradientOverflow.tsx b/frontend/src/lib/components/SelectGradientOverflow.tsx index 215b85f6254..ee89329a058 100644 --- a/frontend/src/lib/components/SelectGradientOverflow.tsx +++ b/frontend/src/lib/components/SelectGradientOverflow.tsx @@ -96,7 +96,7 @@ export function SelectGradientOverflow({ }, [autoFocus, defaultOpen]) const outsideClickListener = (event: any): void => { - if (!containerRef.current?.contains(event.target) && isOpen) { + if (!containerRef.current?.contains(event.target) && !dropdownRef.current?.contains(event.target) && isOpen) { selectRef.current?.blur() } }