Let me explain the situation: I have a router link embedded within a navbar, and on top of that there is a button that triggers a route change.
Here is the relevant code snippet:
<router-link v-if="foo" :to="/">
...
<button @click="redirect"> GO </button>
...
The method used for redirection:
redirect() { this.$router.push('/myroute').catch(() => {})
I attempted to manipulate the z-index of both elements, but when I click on the GO button, it first navigates to '/myroute' before going back to '/'.
Is there any workaround for this issue?