Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: chrome/browser/resources/settings/people_page/manage_profile.js

Issue 2389043003: [MD Settings] manage-Profile resets the name to the current name on route change. (Closed)
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/settings/people_page/manage_profile.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/people_page/manage_profile.js
diff --git a/chrome/browser/resources/settings/people_page/manage_profile.js b/chrome/browser/resources/settings/people_page/manage_profile.js
index e7f2901894ed870cb3fa312fb1167d3f6a3686e7..740d4b3eeae7307e7968b8962e5132c954d5f81d 100644
--- a/chrome/browser/resources/settings/people_page/manage_profile.js
+++ b/chrome/browser/resources/settings/people_page/manage_profile.js
@@ -10,7 +10,7 @@
Polymer({
is: 'settings-manage-profile',
- behaviors: [WebUIListenerBehavior],
+ behaviors: [WebUIListenerBehavior, settings.RouteObserverBehavior],
properties: {
/**
@@ -59,6 +59,12 @@ Polymer({
this.browserProxy_.getAvailableIcons().then(setIcons);
},
+ /** @protected */
+ currentRouteChanged: function() {
+ if (settings.getCurrentRoute() == settings.Route.MANAGE_PROFILE)
+ this.$.name.value = this.profileName;
+ },
+
/**
* Handler for when the profile name field is changed, then blurred.
* @private
« no previous file with comments | « chrome/browser/resources/settings/people_page/manage_profile.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698