Skip to content

Commit

Permalink
Fix #5332: Fix hideOverlaysOnScrolling (#5334)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Nov 16, 2023
1 parent 70cbe72 commit 5accb29
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions components/lib/hooks/useOverlayListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -58,15 +51,13 @@ export const useOverlayListener = ({ target, overlay, listener, when = true }) =
bindDocumentClickListener();
bindWindowResizeListener();
bindWindowOrientationChangeListener();
bindWindowScrollChangeListener();
bindOverlayScrollListener();
};

const unbind = () => {
unbindDocumentClickListener();
unbindWindowResizeListener();
unbindWindowOrientationChangeListener();
unbindWindowScrollChangeListener();
unbindOverlayScrollListener();
};

Expand Down

0 comments on commit 5accb29

Please sign in to comment.