Skip to content

Commit 5364b51

Browse files
wardbellIgorMinar
authored andcommitted
fix(aio): scroll to top immediately when doc changes (angular#17310)
1 parent 67ef0f0 commit 5364b51

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

aio/src/app/app.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ export class AppComponent implements OnInit {
185185
// Stop fetching timeout (which, when render is fast, means progress bar never shown)
186186
clearTimeout(this.isFetchingTimeout);
187187

188+
// Put page in a clean visual state
189+
this.scrollService.scrollToTop();
190+
188191
// Scroll 500ms after the doc-viewer has finished rendering the new doc
189192
// The delay is to allow time for async layout to complete
190193
setTimeout(() => {

0 commit comments

Comments
 (0)