Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gatsby-link anchor click #7536

Closed
wants to merge 2 commits into from
Closed

Fix gatsby-link anchor click #7536

wants to merge 2 commits into from

Conversation

porfirioribeiro
Copy link
Contributor

@porfirioribeiro porfirioribeiro commented Aug 22, 2018

When we have

<Link to="#hash">Go to section</Link>

Clicking it would load / instead of scroll to section

This happens because pathname in not a empty string anymore but / because of withPrefix

When we have
```javascript
<Link to="#hash">Go to section</Link>
```
Clicking it would load / instead of scroll to section
@KyleAMathews KyleAMathews force-pushed the master branch 5 times, most recently from fc4ca3e to 2116fff Compare September 17, 2018 20:36
@m-allanson
Copy link
Contributor

Thanks for opening this @porfirioribeiro 🙏👍

It looks like a fix has now been handled in #8061 so I'm going to close this PR. Please re-open if I've got it wrong!

@m-allanson m-allanson closed this Dec 11, 2018
@m-allanson m-allanson deleted the fix-anchors branch December 11, 2018 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants