| Index: chrome/browser/resources/settings/settings_page/main_page_behavior.js
|
| diff --git a/chrome/browser/resources/settings/settings_page/main_page_behavior.js b/chrome/browser/resources/settings/settings_page/main_page_behavior.js
|
| index 268f2af25fbcb40373d0105c89ce11871ba7b40b..56a74cd96cb0047f12135631c2edd43fc828ab8b 100644
|
| --- a/chrome/browser/resources/settings/settings_page/main_page_behavior.js
|
| +++ b/chrome/browser/resources/settings/settings_page/main_page_behavior.js
|
| @@ -67,13 +67,18 @@ var MainPageBehaviorImpl = {
|
| !!oldRoute && !!oldRoute.parent && !!oldRoute.section &&
|
| oldRoute.parent.section != oldRoute.section;
|
|
|
| - // Always scroll to the top if navigating from a section to the root route
|
| - // or when navigating to the About page.
|
| - if (this.scroller &&
|
| - ((oldRouteWasSection && newRoute == settings.Route.BASIC) ||
|
| - newRoute == settings.Route.ABOUT)) {
|
| - this.scroller.scrollTop = 0;
|
| - return;
|
| + if (this.scroller) {
|
| + // When navigating from a section to the root route, we just need to
|
| + // scroll to the top, and can early exit afterwards.
|
| + if (oldRouteWasSection && newRoute == settings.Route.BASIC) {
|
| + this.scroller.scrollTop = 0;
|
| + return;
|
| + }
|
| +
|
| + // When navigating to the About page, we need to scroll to the top, and
|
| + // still do the rest of section management.
|
| + if (newRoute == settings.Route.ABOUT)
|
| + this.scroller.scrollTop = 0;
|
| }
|
|
|
| // Scroll to the section except for back/forward. Also scroll for any
|
|
|