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
36 stars 5 forks source link

Clicking on the links doesn't move the page to specific id. #14

Closed MarekSax closed 3 months ago

MarekSax commented 3 months ago

Hello.

When I scroll through the page the active class is added to the links properly. But when I click on the link it doesn't seem to work.

My repo Demo

prashantchoudhary commented 2 months ago

I am facing the same issue, What is the resolution. When I scroll manually, The link is getting highlighted. However clicking on the link doesn't do anything and no scroll happens. If I remove , the anchor tags start to work fine.

toviszsolt commented 2 months ago

@prashantchoudhary could you please copy here your related code?