title: Vue Router how to scroll to same hash consecutively
body: <p>I'm currently working on a site based on Vue and using Vue Router for routing. My way to handle scroll behavior to anchor links is the following:</p>
  <pre><code>const router = new VueRouter({
      routes,
      scrollBehavior (to) {
          if (to.hash) {
              return { 
                  selector: to.hash,
                  offset: { x: 0, y: 140 }
              }
          }
          return { x: 0, y: 0 }
      }
  })
  </code></pre>
  <p>And my links are built in the following way:</p>
  <pre><code>&lt;router-link class=&quot;insurance-link d-block&quot; to=&quot;#hogar&quot;&gt;
      &lt;img class=&quot;insurance-logo img-fluid&quot; src=&quot;@/assets/home-icon.svg&quot;&gt;
      Hogar
  &lt;/router-link&gt;
  </code></pre>
  <p>If I click on the link for the first time it scrolls to the anchor position fine, but if I scroll back to the top and click on it for the second time it won't scroll back to that position again. If I click on another anchor link and then click on the previous one everything works fine. Any ideas on what might be happening?</p>