codingblocks.online.projectx icon indicating copy to clipboard operation
codingblocks.online.projectx copied to clipboard

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

Open abhishek97 opened this issue 6 years ago • 2 comments

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

abhishek97 avatar May 26 '19 08:05 abhishek97

Working on this

sourabh1031 avatar May 27 '19 11:05 sourabh1031

Is this still open?

IsomerX avatar May 15 '20 12:05 IsomerX