Flag event listeners as passive

This commit is contained in:
schroda
2025-11-22 17:04:50 +01:00
parent 36e6d7d13e
commit 704d3b191f
7 changed files with 10 additions and 10 deletions

View File

@@ -27,8 +27,8 @@ export const useReaderHideOverlayOnUserScroll = (
}
};
scrollElementRef.current?.addEventListener('wheel', handleScroll);
scrollElementRef.current?.addEventListener('touchmove', handleScroll);
scrollElementRef.current?.addEventListener('wheel', handleScroll, { passive: true });
scrollElementRef.current?.addEventListener('touchmove', handleScroll, { passive: true });
return () => {
scrollElementRef.current?.removeEventListener('wheel', handleScroll);
scrollElementRef.current?.removeEventListener('touchmove', handleScroll);