From 8529385e3b552a3077fa063a42e6fff4d6fdf2af Mon Sep 17 00:00:00 2001 From: Aymeric Giraudet Date: Wed, 26 Jul 2023 10:26:59 +0200 Subject: [PATCH] fix(facet-dropdown): dropdown closes even if clicked inside (#459) --- instantsearch.js/facet-dropdown/src/Dropdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instantsearch.js/facet-dropdown/src/Dropdown.js b/instantsearch.js/facet-dropdown/src/Dropdown.js index f1783e25c8..fce4582629 100644 --- a/instantsearch.js/facet-dropdown/src/Dropdown.js +++ b/instantsearch.js/facet-dropdown/src/Dropdown.js @@ -90,7 +90,7 @@ export function createDropdown( setTimeout(() => { state.windowClickListener = event => { // Close if the outside is clicked - if (!rootElem.contains(event.target)) { + if (!event.composedPath().includes(rootElem)) { close(); } };