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

[using-page-transitions] page scrolls to top before transitioning to new page #2666

Closed
dustinhorton opened this issue Oct 29, 2017 · 3 comments · Fixed by #2695
Closed

[using-page-transitions] page scrolls to top before transitioning to new page #2666

dustinhorton opened this issue Oct 29, 2017 · 3 comments · Fixed by #2695

Comments

@dustinhorton
Copy link
Contributor

dustinhorton commented Oct 29, 2017

Really stoked on this new example.

Repro

  1. Create a page with enough content that it's taller then the viewport, and add a 'local' link to the bottom.
  2. Scroll to then click said link.

Expected result

I think the flow should be:

  1. Fade out
  2. Scroll to top
  3. Fade in

Surely been solved before, just haven't personally dug in or looked around yet.

Actual result

  1. Scroll to top
  2. Fade out
  3. Fade in

cc @stevensurgnier (hope that's kosher)

@KyleAMathews
Copy link
Contributor

Hmm the problem is that yeah, scrolling happens immediately when the page transition starts.

How have others approached this?

@stevensurgnier
Copy link
Contributor

Totally kosher with me @dustinhorton :) thanks for helping make the feature better. I'll take a look this week.

@stevensurgnier
Copy link
Contributor

I have a working prototype that uses the getUserConfirmation option of history to initiate the exit animation and delay the history push. Let me test a bit more and I'll put together a PR asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants