From 59c2edb40e553b05e77aa4267f4d955df377ddc9 Mon Sep 17 00:00:00 2001 From: Melloware Date: Thu, 16 Nov 2023 11:36:55 -0500 Subject: [PATCH] Fix #5332: Fix hideOverlaysOnScrolling (#5334) --- components/lib/hooks/useOverlayListener.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/components/lib/hooks/useOverlayListener.js b/components/lib/hooks/useOverlayListener.js index 4490102764..4649b6464b 100644 --- a/components/lib/hooks/useOverlayListener.js +++ b/components/lib/hooks/useOverlayListener.js @@ -36,13 +36,6 @@ export const useOverlayListener = ({ target, overlay, listener, when = true }) = listener && listener(event, { type: 'orientationchange', valid: true }); } }); - const [bindWindowScrollChangeListener, unbindWindowScrollChangeListener] = useEventListener({ - target: 'window', - type: 'scroll', - listener: (event) => { - listener && listener(event, { type: 'scroll', valid: true }); - } - }); const [bindOverlayScrollListener, unbindOverlayScrollListener] = useOverlayScrollListener({ target, listener: (event) => { @@ -58,7 +51,6 @@ export const useOverlayListener = ({ target, overlay, listener, when = true }) = bindDocumentClickListener(); bindWindowResizeListener(); bindWindowOrientationChangeListener(); - bindWindowScrollChangeListener(); bindOverlayScrollListener(); }; @@ -66,7 +58,6 @@ export const useOverlayListener = ({ target, overlay, listener, when = true }) = unbindDocumentClickListener(); unbindWindowResizeListener(); unbindWindowOrientationChangeListener(); - unbindWindowScrollChangeListener(); unbindOverlayScrollListener(); };