0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 09:14:46 +01:00

Change event target criteria for outside click (#4290)

This commit is contained in:
Sam Winslow 2021-05-10 12:34:58 -04:00 committed by GitHub
parent 9742ee9580
commit 5c09c820fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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