From ccbab1c305a53d3398ece3339c0922ac433cf936 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 19 Jan 2024 16:16:49 +0700 Subject: [PATCH] change event listener in popover provider --- src/components/PopoverProvider/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/PopoverProvider/index.tsx b/src/components/PopoverProvider/index.tsx index b1a6ebb0c5c0..a738d1f9798a 100644 --- a/src/components/PopoverProvider/index.tsx +++ b/src/components/PopoverProvider/index.tsx @@ -95,9 +95,9 @@ function PopoverContextProvider(props: PopoverContextProps) { closePopover(); }; - document.addEventListener('scroll', listener, true); + document.addEventListener('wheel', listener, true); return () => { - document.removeEventListener('scroll', listener, true); + document.removeEventListener('wheel', listener, true); }; }, [closePopover]);