fix(aio): scroll to top immediately when doc changes (#17310)

This commit is contained in:
Ward Bell 2017-06-08 11:56:36 -07:00 committed by Igor Minar
parent 67ef0f0c8f
commit 5364b51979
1 changed files with 3 additions and 0 deletions

View File

@ -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(() => {