It looks like Vuejs is automatically scrolling to the top of a page when you push the back button, which is weird because by default the window doesnt even scroll to the top when you change route in a SPA or go to a new page. You need to explicitly set scrollBehaviour to scroll to the top. So how can we prevent the page automatically scrolling to the top when you press the back button.
beforeRouteLeave (to, from, next) { alert('Are you sure you want to leave this page and lose unsaved changes') // Notice how the page automatically scrolls to the top here even if the user were to response 'No' in a dialog situation } Heres a code pen of the problem https://codepen.io/anon/pen/bOGqVP
scrollBehavioris commented out, you probably should look for other culprits. Are you clicking a link withhref="#"?