From 64b2e675864b41db4f8298da2512fa4500898bd1 Mon Sep 17 00:00:00 2001 From: Bam6ycha <84175555+Bam6ycha@users.noreply.github.com> Date: Tue, 7 Nov 2023 12:48:03 +0500 Subject: [PATCH] EPMRPP-79105 || Fix modal closing on click outside (#3638) --- app/src/common/hooks/useOnClickOutside.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/common/hooks/useOnClickOutside.js b/app/src/common/hooks/useOnClickOutside.js index f3d01ee40b..ce4d582bcd 100644 --- a/app/src/common/hooks/useOnClickOutside.js +++ b/app/src/common/hooks/useOnClickOutside.js @@ -28,10 +28,10 @@ export const useOnClickOutside = (ref, handler) => { } }; - document.addEventListener('pointerdown', listener); + document.addEventListener('pointerup', listener); return () => { - document.removeEventListener('pointerdown', listener); + document.removeEventListener('pointerup', listener); }; }, [ref, handler]); };