fix(aio): scroll to top immediately when doc changes (#17310)
This commit is contained in:
parent
67ef0f0c8f
commit
5364b51979
|
@ -185,6 +185,9 @@ export class AppComponent implements OnInit {
|
||||||
// Stop fetching timeout (which, when render is fast, means progress bar never shown)
|
// Stop fetching timeout (which, when render is fast, means progress bar never shown)
|
||||||
clearTimeout(this.isFetchingTimeout);
|
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
|
// Scroll 500ms after the doc-viewer has finished rendering the new doc
|
||||||
// The delay is to allow time for async layout to complete
|
// The delay is to allow time for async layout to complete
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
Loading…
Reference in New Issue