Title: aio: retain previous scroll position · Issue #17308 · angular/angular · GitHub
Open Graph Title: aio: retain previous scroll position · Issue #17308 · angular/angular
X Title: aio: retain previous scroll position · Issue #17308 · angular/angular
Description: 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 Scro...
Open Graph Description: 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 p...
X Description: 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 p...
Opengraph URL: https://github.com/angular/angular/issues/17308
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"aio: retain previous scroll position","articleBody":"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.\r\n\r\nFor example:\r\n1. Go to QuickStart\r\n2. Scroll down near bottom\r\n3. Go to CLI QuickStart\r\n4. Go back to QuickStart\r\n\r\nNotice that you’re at the TOP of QuickStart, not down where you were.\r\n\r\nThat 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`. \r\n\r\nI propose that we implement that behavior.\r\n\r\nWe 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.\r\n\r\n@IgorMinar writes:\r\n\r\n>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\r\n\r\nThat is worth exploring when we get to it.\r\n\r\nOn June 7th we agreed to defer this issue until after release.","author":{"url":"https://github.com/wardbell","@type":"Person","name":"wardbell"},"datePublished":"2017-06-07T19:34:54Z","url":"https://github.com/angular/angular/issues/17308"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4652502b-050c-2a3c-000e-a4da826cdc3d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A71A:34DB8F:126A521:189B161:6B012837 |
| html-safe-nonce | a34757ef958c51e35ac78f79f43324aedcb13604b4c682723adc692f8872c1a5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzFBOjM0REI4RjoxMjZBNTIxOjE4OUIxNjE6NkIwMTI4MzciLCJ2aXNpdG9yX2lkIjoiMjU4NjgxNjUzMzEwNzkxMDcxMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 722e86ef04af065e8eca7ea6eaf406d122b9033d008f79ce9afaa52d4aacd53c |
| hovercard-subject-tag | issue:234318619 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/17308/issue_layout |
| twitter:image | https://opengraph.githubassets.com/54250f2a04eac36dfdc2739d5aeae1b880f17c5efc99c891792a48953b53b93b/angular/angular/issues/17308 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/54250f2a04eac36dfdc2739d5aeae1b880f17c5efc99c891792a48953b53b93b/angular/angular/issues/17308 |
| og:image:alt | 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 p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wardbell |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width