From c1165924c3d8cd0631e9fbd1599e57bc90a3e35b Mon Sep 17 00:00:00 2001 From: bielinskim <45104530+bielinskim@users.noreply.github.com> Date: Fri, 8 Jan 2021 12:28:11 +0100 Subject: [PATCH] fix(clickOutside): set event propagation to capturing phase Co-authored-by: bielinskim --- packages/svelte-materialify/src/actions/ClickOutside/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/svelte-materialify/src/actions/ClickOutside/index.js b/packages/svelte-materialify/src/actions/ClickOutside/index.js index 951b22ae..8a12a2ff 100644 --- a/packages/svelte-materialify/src/actions/ClickOutside/index.js +++ b/packages/svelte-materialify/src/actions/ClickOutside/index.js @@ -10,7 +10,7 @@ export default (node, _options = {}) => { node.dispatchEvent(new CustomEvent('clickOutside')); } } - document.addEventListener('click', detect, { passive: true }); + document.addEventListener('click', detect, { passive: true, capture: true }); return { destroy() { document.removeEventListener('click', detect);