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

We need to scroll to the top of the page, when showing pages #418

Open
abhishek97 opened this issue May 26, 2019 · 1 comment · May be fixed by #420

Comments

@abhishek97
Copy link
Member

commented May 26, 2019

By Default, the scroll position is preserved while transitioning routes. However, at times this isn't the desired behaviour.
We need to scroll to top for the following pages:

  • Home
  • All Courses
  • My Courses
  • Course Timeline (Course Overview)
  • Course/:id

How ?

Use ember-router-scroll plugin, and use the mixin at the mentioned routes.

Don't window.scrollTop(0, 0) in beforeModel or similar hook. This will not preserve scroll position when using browser's back button. #DontBreakTheWeb

@sourabh1031

This comment has been minimized.

Copy link

commented May 27, 2019

Working on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.