diff --git a/packages/lib/src/components/internal/FormFields/Select/Select.tsx b/packages/lib/src/components/internal/FormFields/Select/Select.tsx index eb6b3e8220..17b2a0bb84 100644 --- a/packages/lib/src/components/internal/FormFields/Select/Select.tsx +++ b/packages/lib/src/components/internal/FormFields/Select/Select.tsx @@ -77,7 +77,12 @@ function Select(props: SelectProps) { * @param e - MouseEvent */ const handleClickOutside = (e: MouseEvent) => { - if (!selectContainerRef.current.contains(e.target)) { + // use composedPath so it can also check when inside a web component + // if composedPath is not available fallback to e.target + const clickIsOutside = e.composedPath ? + !e.composedPath().includes(selectContainerRef.current) : + !selectContainerRef.current.contains(e.target); + if (clickIsOutside) { setShowList(false); } };