| Index: chrome/browser/resources/settings/settings_menu/settings_menu.js
|
| diff --git a/chrome/browser/resources/settings/settings_menu/settings_menu.js b/chrome/browser/resources/settings/settings_menu/settings_menu.js
|
| index 306f691c8bf585129c31090e4a80aeb44df67728..122f10a9f681dec320072f202d7c6b19358c557e 100644
|
| --- a/chrome/browser/resources/settings/settings_menu/settings_menu.js
|
| +++ b/chrome/browser/resources/settings/settings_menu/settings_menu.js
|
| @@ -9,6 +9,8 @@
|
| Polymer({
|
| is: 'settings-menu',
|
|
|
| + behaviors: [settings.RouteObserverBehavior],
|
| +
|
| properties: {
|
| advancedOpened: {
|
| type: Boolean,
|
| @@ -29,18 +31,20 @@ Polymer({
|
| 'subMenu.tap': 'onLinkTap_',
|
| },
|
|
|
| - /** @override */
|
| - attached: function() {
|
| - var currentPath = settings.getCurrentRoute().path;
|
| + /** @param {!settings.Route} newRoute */
|
| + currentRouteChanged: function(newRoute) {
|
| + var currentPath = newRoute.path;
|
|
|
| // Focus the initially selected path.
|
| var anchors = this.root.querySelectorAll('a');
|
| for (var i = 0; i < anchors.length; ++i) {
|
| if (anchors[i].getAttribute('href') == currentPath) {
|
| this.setSelectedUrl_(anchors[i].href);
|
| - break;
|
| + return;
|
| }
|
| }
|
| +
|
| + this.setSelectedUrl_(''); // Nothing is selected.
|
| },
|
|
|
| /**
|
|
|