diff --git a/src/util/scroll.js b/src/util/scroll.js index c6c055a97..d2588fec4 100644 --- a/src/util/scroll.js +++ b/src/util/scroll.js @@ -8,6 +8,10 @@ import { extend } from './misc' const positionStore = Object.create(null) export function setupScroll () { + // Prevent browser scroll behavior on History popstate + if ('scrollRestoration' in window.history) { + window.history.scrollRestoration = 'manual' + } // Fix for #1585 for Firefox // Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678 // Fix for #2774 Support for apps loaded from Windows file shares not mapped to network drives: replaced location.origin with