I'm facing an issue with the <nuxt-link>
component in my Nuxt application:
- The first time I click on the link, everything works perfectly and the page is changed as expected.
- However, if I scroll down a bit and try clicking the link again, nothing happens because the URL is already in the browser's address bar.
Is there a way to override this behavior so that when I click on the nuxt-link
, it scrolls to the desired section regardless of previous clicks? (Without refreshing the page)
This is how my nuxt-link
is set up:
<nuxt-link :to="{ path: localePath('/'), hash: '#homepage' }"
>
<span>Homepage</span>
</nuxt-link>