Commit 92dc010b authored by Scott Chen's avatar Scott Chen Committed by Commit Bot

Settings: fix search's associated control for edit profile subpage

A bug occured when searching through settings page, because one of
the controls associated with the "edit person" subpage does not exist
if DICE is enabled. This CL points it to a different control when DICE
is enabled.

Bug: 876280
Change-Id: I24049100f2b2357ada85b07a44c893a39fd1b66b
Reviewed-on: https://chromium-review.googlesource.com/1198006
Commit-Queue: Scott Chen <scottchen@chromium.org>
Reviewed-by: default avatarEsmael El-Moslimany <aee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587862}
parent b8ede7da
...@@ -450,7 +450,7 @@ ...@@ -450,7 +450,7 @@
<if expr="not chromeos"> <if expr="not chromeos">
<template is="dom-if" route-path="/manageProfile"> <template is="dom-if" route-path="/manageProfile">
<settings-subpage <settings-subpage
associated-control="[[$$('#picture-subpage-trigger')]]" associated-control="[[getEditPersonAssocControl_(diceEnabled_)]]"
page-title="$i18n{editPerson}"> page-title="$i18n{editPerson}">
<settings-manage-profile profile-name="[[profileName_]]" <settings-manage-profile profile-name="[[profileName_]]"
sync-status="[[syncStatus]]"> sync-status="[[syncStatus]]">
......
...@@ -262,6 +262,15 @@ Polymer({ ...@@ -262,6 +262,15 @@ Polymer({
} }
}, },
/**
* @return {!Element}
* @private
*/
getEditPersonAssocControl_: function() {
return this.diceEnabled_ ? assert(this.$$('#edit-profile')) :
assert(this.$$('#picture-subpage-trigger'));
},
// <if expr="chromeos"> // <if expr="chromeos">
/** @private */ /** @private */
getPasswordState_: function(hasPin, enableScreenLock) { getPasswordState_: function(hasPin, enableScreenLock) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment