You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
posva
changed the title
calcurated scroll position is incorrect in some browser with animation
calculated scroll position is incorrect in some browser with animation
Mar 26, 2019
Version
2.6.0
Reproduction link
https://jsfiddle.net/ykojima/krqwkfuy/
Steps to reproduce
What is expected?
change route to /bar and scroll to "Bar-2" h2 element.
In Chrome, it works fine.
What is actually happening?
change route to /bar, but scroll to the bottom of the page.
This happens in IE11, Firefox, Safari (Mac).
I think this problem cased by:
getElementPosition()
is called with the timing at which both leaving route-component and entering route-component existwindow.scrollTo()
method is called with the timing at which only entered route-component existhttps://github.com/vuejs/vue-router/blob/v2.6.0/src/util/scroll.js#L81
when animation is disabled ( or comment out
<transition>
), this problem does not happen.The text was updated successfully, but these errors were encountered: