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
With our current scrolling, when you return to a page that you’ve seen before, the app scrolls either to top or the bookmark in the URL. That means if you bounce between two guides, you lose your place.
For example:
Go to QuickStart
Scroll down near bottom
Go to CLI QuickStart
Go back to QuickStart
Notice that you’re at the TOP of QuickStart, not down where you were.
That isn’t how browser pages usually work. The browser typically remembers where you were and leaves you there. You can see this behavior by commenting out ALL scrolling within app.component.ts.
I propose that we implement that behavior.
We could achieve that by caching the last URL to a page as well as the page itself. If you navigate to a page with the same URL as is in cache, no scroll. If the URL has changed, update cache and scroll.
The solution should be implemented via location.pushState and I don’t want to go there now. We should definitely not build up a parallel history stack to the one that’s already in the browser
That is worth exploring when we get to it.
On June 7th we agreed to defer this issue until after release.
With #28037, we now have scroll position restoration when navigating forward/backward in history. I think this covers it (given Igor's comment to go through pushState and not build up a parallel history stack to the one that’s already in the browser).
Activity
feat(docs-infra): saves the scroll position before the change of loca…
feat(docs-infra): saves the scroll position before the change of loca…
feat(docs-infra): saves the scroll position before the change of loca…
gkalpak commentedon Dec 22, 2019
With #28037, we now have scroll position restoration when navigating forward/backward in history. I think this covers it (given Igor's comment to go through
pushStateand not build up a parallel history stack to the one that’s already in the browser).angular-automatic-lock-bot commentedon Jan 22, 2020
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.