diff --git a/src/components/dropdown/dropdown.tsx b/src/components/dropdown/dropdown.tsx index 32e2b5997..289b38b54 100644 --- a/src/components/dropdown/dropdown.tsx +++ b/src/components/dropdown/dropdown.tsx @@ -217,10 +217,9 @@ export class Dropdown { } handleDocumentMouseDown(event: MouseEvent) { - const target = event.target as HTMLElement; - // Close when clicking outside of the close element - if (target.closest(this.containingElement.tagName.toLowerCase()) !== this.containingElement) { + const path = event.composedPath() as Array; + if (!path.includes(this.containingElement)) { this.hide(); return; }