Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle scrollBehaviour with transitions #1263

Open
posva opened this issue Mar 17, 2017 · 3 comments
Open

Handle scrollBehaviour with transitions #1263

posva opened this issue Mar 17, 2017 · 3 comments
Labels
docs group[transition wrapped views] Issues regarding things not being in-sync on hooks because of a transition

Comments

@posva
Copy link
Member

posva commented Mar 17, 2017

from #1262

Vue.js / vue-router versions

2.1.2 / 2.1.1

Reproduction Link

http://jsfiddle.net/qw4hbgek/

Problem

Clicking on Home, then on post1 will not scroll down because of the transition

Feature request

We should at least provide a way of doing it userland in the docs. Ideally, scrollbehaviour should trigger once the new view is inserted into the dom

@homerjam
Copy link
Contributor

homerjam commented Sep 22, 2017

Would supporting a returned promise here be enough to support most cases where there is a transition etc?

@homerjam
Copy link
Contributor

I've had a go at this, check out this commit.

It could be improved, if there were away to obtain the transition duration from the route object for example.

Would love to get some thoughts/input @posva @atinux @pi0 @yyx990803

@posva posva added the group[transition wrapped views] Issues regarding things not being in-sync on hooks because of a transition label Mar 26, 2019
@posva posva removed the improvement label Feb 14, 2020
@posva
Copy link
Member Author

posva commented Aug 8, 2020

I forgot to add this can be handled with https://github.com/posva/vue-router-view-transition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs group[transition wrapped views] Issues regarding things not being in-sync on hooks because of a transition
Projects
None yet
Development

No branches or pull requests

2 participants