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

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

Issue 2626733002: MD Settings People: Fix ChromeOS Change Picture selected image bug (Closed)
Patch Set: fix indent Created 3 years, 11 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 | « no previous file | chrome/test/data/webui/settings/people_page_change_picture_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/people_page/change_picture.js
diff --git a/chrome/browser/resources/settings/people_page/change_picture.js b/chrome/browser/resources/settings/people_page/change_picture.js
index 977c4483b043ba79f1470673cefbb1cea35c43ae..6ea1eb945024f90d2db5837c94b6007b38adbc76 100644
--- a/chrome/browser/resources/settings/people_page/change_picture.js
+++ b/chrome/browser/resources/settings/people_page/change_picture.js
@@ -138,9 +138,13 @@ Polymer({
/** @protected */
currentRouteChanged: function(newRoute) {
- // Reset the selection state when we navigate to this page.
if (newRoute == settings.Route.CHANGE_PICTURE) {
this.browserProxy_.initialize();
+
+ // This in needed because we manually clear the selectedItem_ property
+ // when navigating away. The selector element doesn't fire its upward
+ // data binding unless its selected item has changed.
+ this.selectedItem_ = this.$.selector.selectedItem;
} else {
// Ensure we deactivate the camera when we navigate away.
this.selectedItem_ = null;
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/people_page_change_picture_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698