react-use-scroll-direction icon indicating copy to clipboard operation
react-use-scroll-direction copied to clipboard

Scrolling to the top in Safari bounces, making isScrollingDown true

Open aheilemann opened this issue 2 years ago • 0 comments

In Safari you can scroll further than the top and it then bounces back down, firing an unfortunate isScrollingDown event. Made it difficult to use for showing/hiding a mobile menu.

example: ` useEffect(() => { if (isScrollingDown) { setMinimizeNav(true); }

if (isScrollingUp) {
  setMinimizeNav(false);
}

}, [isScrollingUp, isScrollingDown]);`

aheilemann avatar Dec 07 '22 20:12 aheilemann