| 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 78bfe20f7512cb76e14f133ccba95ad8b8bd513a..6144263d8a4e798b5d3fac46325b97b1cfb94148 100644
|
| --- a/chrome/browser/resources/settings/settings_page/main_page_behavior.js
|
| +++ b/chrome/browser/resources/settings/settings_page/main_page_behavior.js
|
| @@ -88,14 +88,14 @@ var MainPageBehaviorImpl = {
|
| if (!currentRoute.isSubpage() || expandedSection != currentSection) {
|
| promise = this.collapseSection_(expandedSection);
|
| // Scroll to the collapsed section.
|
| - if (currentSection)
|
| + if (currentSection && !settings.lastRouteChangeWasPopstate())
|
| currentSection.scrollIntoView();
|
| }
|
| } else if (currentSection) {
|
| // Expand the section into a subpage or scroll to it on the main page.
|
| if (currentRoute.isSubpage())
|
| promise = this.expandSection_(currentSection);
|
| - else
|
| + else if (!settings.lastRouteChangeWasPopstate())
|
| currentSection.scrollIntoView();
|
| }
|
|
|
| @@ -228,13 +228,7 @@ var MainPageBehaviorImpl = {
|
| var newSection = settings.getCurrentRoute().section &&
|
| this.getSection(settings.getCurrentRoute().section);
|
|
|
| - // Scroll to the section if indicated by the route. TODO(michaelpg): Is
|
| - // this the right behavior, or should we return to the previous scroll
|
| - // position?
|
| - if (newSection)
|
| - newSection.scrollIntoView();
|
| - else
|
| - this.scroller.scrollTop = this.origScrollTop_;
|
| + this.scroller.scrollTop = this.origScrollTop_;
|
|
|
| this.currentAnimation_ = section.animateCollapse(
|
| /** @type {!HTMLElement} */(this.scroller));
|
|
|