Chromium Code Reviews| 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 4b6442c44c82c15ddccf7898de684603d1012755..933a0ec4baab3a6cd5c57404141fed70b549de6c 100644 |
| --- a/chrome/browser/resources/settings/settings_page/main_page_behavior.js |
| +++ b/chrome/browser/resources/settings/settings_page/main_page_behavior.js |
| @@ -394,18 +394,23 @@ var RoutableBehaviorImpl = { |
| return; |
| } |
| - if (!newRouteIsSubpage && oldRouteIsSubpage) { |
| - var section = this.getSection_(oldRoute.section); |
| - if (section) |
| - this.collapseSection(section); |
| - } else if (newRouteIsSubpage && |
| - (!oldRouteIsSubpage || newRoute.section != oldRoute.section)) { |
| - var section = this.getSection_(newRoute.section); |
| - if (section) |
| - this.expandSection(section); |
| - } else if (newRoute && newRoute.section && |
| - this.$$('[data-page=' + newRoute.page + ']')) { |
| - this.scrollToSection_(); |
| + if (newRouteIsSubpage) { |
| + if (!oldRouteIsSubpage || newRoute.section != oldRoute.section) { |
| + var section = this.getSection_(newRoute.section); |
| + if (section) |
|
michaelpg
2016/07/20 19:45:05
when does this fail? seems like something the rout
dschuyler
2016/07/20 20:20:42
This code was simply moved in this CL, so I
don't
|
| + this.expandSection(section); |
| + } |
| + } else { |
| + if (oldRouteIsSubpage) { |
| + var section = this.getSection_(oldRoute.section); |
| + if (section) |
| + this.collapseSection(section); |
| + } |
| + |
| + if (newRoute && newRoute.section && |
| + this.$$('[data-page=' + newRoute.page + ']')) { |
| + this.scrollToSection_(); |
| + } |
| } |
| }, |