Skip to content

Commit

Permalink
Do not change scroll position on back/forward
Browse files Browse the repository at this point in the history
  • Loading branch information
eronisko committed Apr 18, 2024
1 parent 57747fc commit f70a93f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export default {
},
mounted() {
window.addEventListener('popstate', this.handleHistoryPopState)
window.history.scrollRestoration = 'manual' // Do not change scroll position on back/forward
},
beforeUnmount() {
window.removeEventListener('popstate', this.handleHistoryPopState)
Expand Down

0 comments on commit f70a93f

Please sign in to comment.