gatsby-plugin-anchor-links icon indicating copy to clipboard operation
gatsby-plugin-anchor-links copied to clipboard

Scroll only works on second click

Open DennisKraaijeveld opened this issue 3 years ago • 2 comments

Hi!

I use this plugin on a FAQ page with on the top of the page a row of anchor links to different sections of the page. But when I click this anchor link, it jumps, without smooth scroll animation, it instantly jumps to the correct section. When I scroll back up and use the anchor link again, the scroll animation is working.

Is there something wrong with my component?

 <p className="tracking-widest text-mainPink-500">
                                    <AnchorLink
                                      to={`/veelgestelde-vragen/#${slice2.primary.title.text}`}
                                      title={slice2.primary.title.text}
                                    >
                                      {slice2.primary.title.text}
                                    </AnchorLink>
                                  </p>

DennisKraaijeveld avatar Oct 05 '21 13:10 DennisKraaijeveld

Same. This plugin is consistently broken on the first click everywhere I've used it.

doublejosh avatar Mar 23 '22 22:03 doublejosh

Same here, any solution?

hasanshafiq29 avatar Sep 28 '23 20:09 hasanshafiq29