From 5364b5197963495c7b2670a61a071906825f934e Mon Sep 17 00:00:00 2001 From: Ward Bell Date: Thu, 8 Jun 2017 11:56:36 -0700 Subject: [PATCH] fix(aio): scroll to top immediately when doc changes (#17310) --- aio/src/app/app.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aio/src/app/app.component.ts b/aio/src/app/app.component.ts index 76952d9c73..26afa78a82 100644 --- a/aio/src/app/app.component.ts +++ b/aio/src/app/app.component.ts @@ -185,6 +185,9 @@ export class AppComponent implements OnInit { // Stop fetching timeout (which, when render is fast, means progress bar never shown) clearTimeout(this.isFetchingTimeout); + // Put page in a clean visual state + this.scrollService.scrollToTop(); + // Scroll 500ms after the doc-viewer has finished rendering the new doc // The delay is to allow time for async layout to complete setTimeout(() => {