toviszsolt / react-scrollspy

ScrollSpy React Component - Automatically update navigation components based on scroll position to indicate which link is currently active in the viewport.
https://32jhvk.csb.app
MIT License
30 stars 5 forks source link

Not working alongside scroll-snap #7

Closed ryanregis closed 2 years ago

ryanregis commented 2 years ago

When I click the links, the window doesn't scroll when scroll-snap in CSS is enabled. Is this a feature or just wasn't included?

toviszsolt commented 2 years ago

@ryanregis scroll-snap is a browser built-in feature. Unfortunately, browser built-in features are breaking the developer code by taking complete control over scroll events and overriding them. Now you have to decide which feature gives you a better user experience and use it.