@@ -52,15 +52,15 @@ export class HTML5History extends History {
52
52
53
53
push ( location : RawLocation ) {
54
54
const current = this . current
55
- super . transitionTo ( location , route => {
55
+ this . transitionTo ( location , route => {
56
56
pushState ( cleanPath ( this . base + route . fullPath ) )
57
57
this . handleScroll ( route , current , false )
58
58
} )
59
59
}
60
60
61
61
replace ( location : RawLocation ) {
62
62
const current = this . current
63
- super . transitionTo ( location , route => {
63
+ this . transitionTo ( location , route => {
64
64
replaceState ( cleanPath ( this . base + route . fullPath ) )
65
65
this . handleScroll ( route , current , false )
66
66
} )
@@ -79,7 +79,7 @@ export class HTML5History extends History {
79
79
assert ( typeof behavior === 'function' , `scrollBehavior must be a function` )
80
80
81
81
// wait until re-render finishes before scrolling
82
- router . app . $nextTick ( ( ) => {
82
+ setTimeout ( ( ) => {
83
83
let position = getScrollPosition ( _key )
84
84
const shouldScroll = behavior ( to , from , isPop ? position : null )
85
85
if ( ! shouldScroll ) {
@@ -100,7 +100,7 @@ export class HTML5History extends History {
100
100
if ( position ) {
101
101
window . scrollTo ( position . x , position . y )
102
102
}
103
- } )
103
+ } , 0 )
104
104
}
105
105
}
106
106
0 commit comments