()
| 48 | |
| 49 | // Timeouts can be starved while scrolling (see issue #106), so check the elapsed time each frame instead |
| 50 | const checkForScrollEnd = () => { |
| 51 | if (performance.now() - lastScrollTime >= delay) { |
| 52 | animationFrameId = undefined; |
| 53 | setIsScrolling(false); |
| 54 | } else { |
| 55 | animationFrameId = ownerWindow.requestAnimationFrame(checkForScrollEnd); |
| 56 | } |
| 57 | }; |
| 58 | |
| 59 | const onScroll = () => { |
| 60 | setIsScrolling(true); |
nothing calls this directly
no outgoing calls
no test coverage detected