We are on page A, go to page B and then go back to page A. The scroll position is not restored.
Not a bug but I think it's a useful feature for an SPA framework.
Found this project that implements this feature : https://github.com/mark-hahn/vue-keep-scroll
Will try to research this one and if I'm successful and I have enough time I'll inject this into v0.7.
On v0.14 when using vue router's history mode this will work by default.
The scroll position feature using the custom directive above works, however it may cause some issues in a more complex SPA.
I've tried it with mixed success. Then again it could be my implementation that's problematic :)
Unfortunately vue-router's hash mode doesn't support this, therefore Cordova builds don't either ...
Can we have any way to control this behaviour ?
I see how it can be useful in many cases. But I've already encountered a couple cases where it is not desirable (in the same app). It would be great if we could toggle this behaviour easily either at the router level, or even (better than nothing) at the page/component level.
Available in v0.14 along with Vue Router 3.x and the scrollBehavior router prop.
Most helpful comment
On v0.14 when using vue router's history mode this will work by default.