gatsby-plugin-react-i18next icon indicating copy to clipboard operation
gatsby-plugin-react-i18next copied to clipboard

Link hash doesn't work if path doesn't change

Open soren121 opened this issue 5 years ago • 1 comments

Some of the nav links on my site are links to an element ID on the homepage, like this:

<Link to="/#about">{t('about')}</Link>

Without this plugin installed, clicking this will navigate to the home page (if necessary) and then scroll down to the #about element.

After installing the plugin, however, this will only work correctly if you are on a different page when you click the link. If you're already on the homepage, it doesn't scroll.

soren121 avatar Oct 21 '20 17:10 soren121

Any update on this?

michelebruno avatar Jul 31 '21 14:07 michelebruno