Home

Issue: 1367

bug - this.$router.push doesn't work for the first click where hash is present

[issue link]

Reproduction

  1. Click on the link on the page with the hash, eg.:
    <nuxt-link :to="`${postLink(post)}#add-comment-form`">
    Page is changing correctly.

  2. After that click on the second link, eg.:
    <a @click="changeCategory(c)">category</a>
    where changeCategory:

    methods: {
      changeCategory (cat) {
        const url = categoryLink(cat)
        console.log('moving to ', url)
        this.$router.push({ path: url })
      }
    },

The method is called, the progress bar is animating but the page doesn’t change.

  1. To change to page I need to click once again on the same link.
    The bug is only present when the first link has a # hash at the end. Tested with alfa-4 and rc-4

thanks for help in advance,

This bug report is available on Nuxt.js community (#c1211)